mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2025-01-06 21:49:40 +02:00
d563f56ab0
[why] Some changes to bring it in line with the other workflows. [how] Sorted from short to long: * Name all steps * Correct trigger * Remove unused output * Simplify zipcmp decision * Use apt instead of apt-get * Update upload-artifact action * Remove some trailing whitespace * Remove name from artifact to prevent strange double zip name * Use ordinary checkout instead of sparse - we need it anyhow to commit [note] Ok, 'simplify zipcmd decision' that might be matter of taste. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
name: Create FontPatcher.zip
|
|
|
|
on:
|
|
push:
|
|
branches: master
|
|
paths:
|
|
- font-patcher
|
|
- src/glyphs/**
|
|
- src/archive-font-patcher-readme.me
|
|
- bin/scripts/archive-font-patcher.sh
|
|
- bin/scripts/name_parser/Fontname*.py
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Fetch dependencies
|
|
run: sudo apt install -y -q zipcmp
|
|
|
|
- name: Create archive
|
|
run: |
|
|
chmod u+x font-patcher bin/scripts/archive-font-patcher.sh
|
|
cd bin/scripts
|
|
./archive-font-patcher.sh
|
|
|
|
- name: Upload archive as artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
path: archives/FontPatcher.zip
|
|
retention-days: 1
|
|
|
|
- name: Check if archive contents changed
|
|
id: updated-or-not
|
|
run: |
|
|
(zipcmp archives/FontPatcher.zip ./FontPatcher.zip; \
|
|
echo "updated=$?" >> $GITHUB_OUTPUT) || true
|
|
|
|
- name: Prepare commit
|
|
if: steps.updated-or-not.outputs.updated != 0
|
|
run: cp -f archives/FontPatcher.zip .
|
|
|
|
- name: Commit new archive
|
|
uses: EndBug/add-and-commit@v9
|
|
if: steps.updated-or-not.outputs.updated != 0
|
|
with:
|
|
fetch: false
|
|
add: "FontPatcher.zip"
|
|
message: "[ci] Update FontPatcher.zip"
|
|
committer_name: GitHub Actions
|
|
committer_email: 41898282+github-actions[bot]@users.noreply.github.com
|