diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index a46a12134bf..8cbe3030ffe 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -8,7 +8,7 @@ on: type: string latest: required: false - default: false + default: "0" description: Mark this release as latest (`1`) or not (`0`, default) type: string dry_run: @@ -23,6 +23,7 @@ on: type: string latest: required: false + default: "0" description: Mark this release as latest (`1`) or not (`0`, default) type: string dry_run: diff --git a/.github/workflows/release-comms.yml b/.github/workflows/release-comms.yml index dc7355ef0b8..02d53057184 100644 --- a/.github/workflows/release-comms.yml +++ b/.github/workflows/release-comms.yml @@ -8,10 +8,11 @@ on: dry_run: required: false default: true + type: boolean version: required: true latest: - type: bool + type: boolean default: false pull_request: types: @@ -30,17 +31,18 @@ jobs: latest: ${{ steps.output.outputs.latest }} runs-on: ubuntu-latest steps: + # The github-release action expects a `LATEST` value of a string of either '1' or '0' - if: ${{ github.event_name == 'workflow_dispatch' }} run: | echo setting up GITHUB_ENV for ${{ github.event_name }} echo "VERSION=${{ inputs.version }}" >> $GITHUB_ENV echo "DRY_RUN=${{ inputs.dry_run }}" >> $GITHUB_ENV - echo "LATEST=${{ inputs.latest }}" >> $GITHUB_ENV + echo "LATEST=${{ inputs.latest && '1' || '0' }}" >> $GITHUB_ENV - if: ${{ github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') }} run: | echo "VERSION=$(echo ${{ github.head_ref }} | sed -e 's/release\/.*\///g')" >> $GITHUB_ENV echo "DRY_RUN=${{ contains(github.event.pull_request.labels.*.name, 'release/dry-run') }}" >> $GITHUB_ENV - echo "LATEST=${{ contains(github.event.pull_request.labels.*.name, 'release/latest') }}" >> $GITHUB_ENV + echo "LATEST=${{ contains(github.event.pull_request.labels.*.name, 'release/latest') && '1' || '0' }}" >> $GITHUB_ENV - id: output run: | echo "dry_run: $DRY_RUN"