2023-02-17 07:57:49 +02:00
|
|
|
name: Create FontPatcher.zip
|
2023-01-09 21:55:47 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-02-17 07:57:49 +02:00
|
|
|
branches: master
|
2023-01-09 23:52:30 +02:00
|
|
|
paths:
|
|
|
|
- font-patcher
|
|
|
|
- src/glyphs/**
|
|
|
|
- src/archive-font-patcher-readme.me
|
|
|
|
- bin/scripts/archive-font-patcher.sh
|
2023-02-17 07:57:49 +02:00
|
|
|
- bin/scripts/name_parser/Fontname*.py
|
2023-01-09 21:55:47 +02:00
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-02-17 07:57:49 +02:00
|
|
|
- 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
|
2023-02-17 09:47:00 +02:00
|
|
|
./archive-font-patcher.sh intermediate
|
2023-02-17 07:57:49 +02:00
|
|
|
|
|
|
|
- name: Upload archive as artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
2023-02-09 21:37:03 +02:00
|
|
|
with:
|
|
|
|
path: archives/FontPatcher.zip
|
2023-02-17 07:57:49 +02:00
|
|
|
retention-days: 1
|
|
|
|
|
|
|
|
- name: Check if archive contents changed
|
|
|
|
id: updated-or-not
|
2023-02-09 21:37:03 +02:00
|
|
|
run: |
|
2023-02-17 07:57:49 +02:00
|
|
|
(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
|
2023-01-09 23:52:30 +02:00
|
|
|
with:
|
|
|
|
fetch: false
|
|
|
|
add: "FontPatcher.zip"
|
2023-02-17 07:57:49 +02:00
|
|
|
message: "[ci] Update FontPatcher.zip"
|
2023-01-09 23:52:30 +02:00
|
|
|
committer_name: GitHub Actions
|
|
|
|
committer_email: 41898282+github-actions[bot]@users.noreply.github.com
|