From 20c0790c56023e7b1063827a4e3b2e725e47fe56 Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 20 Feb 2024 10:29:48 -0800 Subject: [PATCH] move from env to step output --- .github/workflows/release.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 85c2e580..79191101 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,10 +59,17 @@ defaults: run: shell: bash -env: - TEST_RUN : ${{ inputs.deploy-to == 'test' && 'true' || 'false' }} - jobs: + setup-job-vars: + name: setup job variables + runs-on: ubuntu-latest + outputs: + TEST_RUN: ${{ steps.is_test_run.outputs.TEST_RUN }} + steps: + - id: is_test_run + run: | + echo "TEST_RUN=${{ inputs.deploy-to == 'test' && 'true' || 'false' }}" >> $GITHUB_OUTPUT + bump-version-generate-changelog: name: Bump package version, Generate changelog @@ -70,7 +77,7 @@ jobs: with: version_number: ${{ inputs.version_number }} - test_run: ${{ env.TEST_RUN }} + test_run: ${{ steps.setup-job-vars.outputs.TEST_RUN }} nightly_release: ${{ inputs.nightly_release }} secrets: inherit @@ -143,7 +150,7 @@ jobs: with: version_number: ${{ inputs.version_number }} changelog_path: ${{ needs.bump-version-generate-changelog.outputs.changelog_path }} - test_run: ${{ env.TEST_RUN }} + test_run: ${{ steps.setup-job-vars.outputs.TEST_RUN }} pypi-release: name: Publish to PyPI