From 37bc2d6df3e873e21044f4ec04b090e430cfad63 Mon Sep 17 00:00:00 2001 From: Joseph Hale <47901316+jhale1805@users.noreply.github.com> Date: Fri, 16 Jul 2021 20:53:09 -0700 Subject: [PATCH] Reformat release step gates using workflow syntax The example in the [docs](https://docs.github.com/en/actions/reference/environment-variables#about-environment-variables) uses the workflow syntax `${{env.VARIABLE}}` to evaluate environment variables during `if` gates. I'm hoping this allows the runner to correctly publish a new release when the `PRODUCE_RELEASE` environment variable exported in step 5 is found to be `'true'`. --- .github/workflows/ci-cd.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 607bb7a..474a6cc 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -56,11 +56,11 @@ jobs: && !contains(toJSON(github.event.commits.*.message), '[skip release]')}} >> $GITHUB_ENV" - name: 6. Generate changelog [RELEASE ONLY] id: changelog - if: env.PRODUCE_RELEASE == 'true' + if: ${{ env.PRODUCE_RELEASE == 'true' }} run: ./gradlew generateChangelog - name: 7. Upload changelog as artifact [RELEASE ONLY] id: upload_changelog - if: env.PRODUCE_RELEASE == 'true' + if: ${{ env.PRODUCE_RELEASE == 'true' }} uses: actions/upload-artifact@v2.2.4 with: name: changelog @@ -68,7 +68,7 @@ jobs: if-no-files-found: warn - name: 8. Publish release [RELEASE ONLY] id: release - if: env.PRODUCE_RELEASE == 'true' + if: ${{ env.PRODUCE_RELEASE == 'true' }} uses: softprops/action-gh-release@v1 with: tag_name: ${{ steps.build.outputs.version }} -- 2.51.2