From e5e0ab99b3380cd47525d11389bfc0e3353195a2 Mon Sep 17 00:00:00 2001 From: Tristan Kuehn Date: Wed, 24 Nov 2021 16:44:06 -0500 Subject: [PATCH 1/2] Use env variables to find tag --- .github/workflows/afids-validator_release.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/afids-validator_release.yml b/.github/workflows/afids-validator_release.yml index 07e6361d..8e80b042 100644 --- a/.github/workflows/afids-validator_release.yml +++ b/.github/workflows/afids-validator_release.yml @@ -10,16 +10,17 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout latest tag - id: semver_checkout - uses: EasyDesk/action-semver-checkout@v1 + - name: Checkout release tag + uses: actions/checkout@master + with: + ref: ${{ env.GITHUB_SHA }} - name: Update setup.py version uses: jacobtomlinson/gha-find-replace@master with: include: "setup.py" find: "v[0-9]+.[0-9]+.[0-9]+" - replace: "v${{ steps.semver_checkout.outputs.version }}" + replace: "${{ env.GITHUB_REF }}" - name: Commit setup.py run: | @@ -34,9 +35,9 @@ jobs: - name: Modify release to match release versions run: | - git tag -a v${{ steps.semver_checkout.outputs.version }} -m "v${{ steps.semver_checkout.outputs.version }}" + git tag -a -f -m "{{ env.GITHUB_REF }}" {{ env.GITHUB_REF }} git push - git push origin -f v${{ steps.semver_checkout.outputs.version }} + git push origin -f ${{ env.GITHUB_REF }} - name: Deploy heroku app uses: akhileshns/heroku-deploy@v3.0.4 From bac0a69494e4bb486432b90c63662415bdc089b1 Mon Sep 17 00:00:00 2001 From: Tristan Kuehn Date: Wed, 24 Nov 2021 16:51:18 -0500 Subject: [PATCH 2/2] Directly reference env vars in run directive --- .github/workflows/afids-validator_release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/afids-validator_release.yml b/.github/workflows/afids-validator_release.yml index 8e80b042..d331017d 100644 --- a/.github/workflows/afids-validator_release.yml +++ b/.github/workflows/afids-validator_release.yml @@ -35,9 +35,9 @@ jobs: - name: Modify release to match release versions run: | - git tag -a -f -m "{{ env.GITHUB_REF }}" {{ env.GITHUB_REF }} + git tag -a -f -m "$GITHUB_REF" "$GITHUB_REF" git push - git push origin -f ${{ env.GITHUB_REF }} + git push origin -f "$GITHUB_REF" - name: Deploy heroku app uses: akhileshns/heroku-deploy@v3.0.4