From 2050b4dc16b2323105c7999aad2cbd74155c81be Mon Sep 17 00:00:00 2001 From: Fini Jastrow Date: Thu, 18 Aug 2022 18:25:59 +0200 Subject: [PATCH] CI: Fix patch-em-all: Purge destination dirs if possible [why] The purged (obsolete) files are still existing after release. [how] We restore the deleted files before it adds the new ones. Just delete all font files and then download all the release files (all newly created fonts). `git add` on a directory will remove all missing files. Signed-off-by: Fini Jastrow --- .github/workflows/release.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a7f14b105..04ad1b4ec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -211,6 +211,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Prepare repo (clear out old and obsolete fonts) + run: | + cd -- "$GITHUB_WORKSPACE/patched-fonts" + find . -name "*.[to]tf" -exec rm {} \; + - name: Download patched fonts from build id: download-patched-fonts uses: actions/download-artifact@v2 @@ -218,9 +223,9 @@ jobs: name: patched-fonts path: . - - uses: EndBug/add-and-commit@v7 + - uses: EndBug/add-and-commit@v9 with: add: 'patched-fonts' message: Rebuilds patched fonts committer_name: GitHub Actions - committer_email: 41898282+github-actions[bot]@users.noreply.github.com \ No newline at end of file + committer_email: 41898282+github-actions[bot]@users.noreply.github.com