From 09166dfc24b1289f37d962dfb783e221b3407036 Mon Sep 17 00:00:00 2001 From: knightofiam <72765293+knightofiam@users.noreply.github.com> Date: Wed, 8 Jun 2022 03:39:50 -0600 Subject: [PATCH] Fix GitHub Action deployment cleanup. (#44) - Cleanup should delete newly released executables from GitHub, so they will only be available on itch.io after deployment. Remove the "tags/" prefix from the tag specification that is causing the GitHub Action to not find the currently released tag. - Run cleanup only after itch.io deployment is complete, as it depends on the GitHub executables being present. - Only deploy to itch.io when a release is 'published', not 'created' or 'edited'. This is the recommended standard practice to prevent unintended, faulty or duplicate deployments (such as from draft releases). --- .github/workflows/deploy.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 493eca5..91e84a7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,7 @@ name: 3. deploy on: release: - types: [created, edited] + types: [published] jobs: deploy_mac: @@ -67,11 +67,12 @@ jobs: cleanup: name: cleanup + needs: [deploy_mac, deploy_windows, deploy_linux] runs-on: ubuntu-latest steps: - name: delete github executables uses: mknejp/delete-release-assets@v1 with: token: ${{ secrets.GH_ACTIONS_TOKEN }} - tag: tags/${{ github.event.release.tag_name }} + tag: ${{ github.event.release.tag_name }} assets: 'coa-*.zip'