ci: stop reading GITHUB_WORKFLOW, which rickub's runner does not exportUnverified
The release-notes step ran under set -u and died on the unbound variable; the workflow name is now a literal step env. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FgkcT3UPxwxukBKojB5eg4
5bbf166 parent: 25cc220 modified
.github/workflows/rc.yml +3 -1 | @@ -64,6 +64,8 @@ jobs: | ||
| 64 | 64 | - name: Release notes |
| 65 | 65 | id: notes |
| 66 | 66 | env: |
| 67 | + # rickub's runner does not export GITHUB_WORKFLOW; name it here. | |
| 68 | + WORKFLOW: RC | |
| 67 | 69 | RC_VERSION: ${{ steps.version.outputs.version }} |
| 68 | 70 | BASE_VERSION: ${{ steps.version.outputs.base }} |
| 69 | 71 | run: | |
| @@ -72,7 +74,7 @@ jobs: | ||
| 72 | 74 | echo "Automated release candidate for the upcoming **v${BASE_VERSION}**." |
| 73 | 75 | echo |
| 74 | 76 | echo "- Commit: \`${GITHUB_SHA}\`" |
| 75 | - echo "- Build: run #${GITHUB_RUN_NUMBER} of \`${GITHUB_WORKFLOW}\`" | |
| 77 | + echo "- Build: run #${GITHUB_RUN_NUMBER} of \`${WORKFLOW}\`" | |
| 76 | 78 | echo "- Version stamp: \`${RC_VERSION}\` (\`rickub version\`)" |
| 77 | 79 | echo |
| 78 | 80 | echo "> This is a prerelease built automatically from \`main\`." |
| @@ -64,6 +64,8 @@ jobs: | |||
| 64 | - name: Release notes | 64 | - name: Release notes |
| 65 | id: notes | 65 | id: notes |
| 66 | env: | 66 | env: |
| 67 | + # rickub's runner does not export GITHUB_WORKFLOW; name it here. | ||
| 68 | + WORKFLOW: RC | ||
| 67 | RC_VERSION: ${{ steps.version.outputs.version }} | 69 | RC_VERSION: ${{ steps.version.outputs.version }} |
| 68 | BASE_VERSION: ${{ steps.version.outputs.base }} | 70 | BASE_VERSION: ${{ steps.version.outputs.base }} |
| 69 | run: | | 71 | run: | |
| @@ -72,7 +74,7 @@ jobs: | |||
| 72 | echo "Automated release candidate for the upcoming **v${BASE_VERSION}**." | 74 | echo "Automated release candidate for the upcoming **v${BASE_VERSION}**." |
| 73 | echo | 75 | echo |
| 74 | echo "- Commit: \`${GITHUB_SHA}\`" | 76 | echo "- Commit: \`${GITHUB_SHA}\`" |
| 75 | - echo "- Build: run #${GITHUB_RUN_NUMBER} of \`${GITHUB_WORKFLOW}\`" | 77 | + echo "- Build: run #${GITHUB_RUN_NUMBER} of \`${WORKFLOW}\`" |
| 76 | echo "- Version stamp: \`${RC_VERSION}\` (\`rickub version\`)" | 78 | echo "- Version stamp: \`${RC_VERSION}\` (\`rickub version\`)" |
| 77 | echo | 79 | echo |
| 78 | echo "> This is a prerelease built automatically from \`main\`." | 80 | echo "> This is a prerelease built automatically from \`main\`." |
modified
.github/workflows/release.yml +3 -1 | @@ -150,6 +150,8 @@ jobs: | ||
| 150 | 150 | - name: Release notes |
| 151 | 151 | id: notes |
| 152 | 152 | env: |
| 153 | + # rickub's runner does not export GITHUB_WORKFLOW; name it here. | |
| 154 | + WORKFLOW: Release | |
| 153 | 155 | TAG: ${{ steps.check.outputs.tag }} |
| 154 | 156 | run: | |
| 155 | 157 | set -euo pipefail |
| @@ -157,7 +159,7 @@ jobs: | ||
| 157 | 159 | echo "## rickub ${TAG}" |
| 158 | 160 | echo |
| 159 | 161 | echo "- Commit: \`${GITHUB_SHA}\` (\`${GITHUB_REF_NAME}\`)" |
| 160 | - echo "- Built by \`${GITHUB_WORKFLOW}\` run #${GITHUB_RUN_NUMBER}" | |
| 162 | + echo "- Built by \`${WORKFLOW}\` run #${GITHUB_RUN_NUMBER}" | |
| 161 | 163 | echo |
| 162 | 164 | echo '### Install' |
| 163 | 165 | echo |
| @@ -150,6 +150,8 @@ jobs: | |||
| 150 | - name: Release notes | 150 | - name: Release notes |
| 151 | id: notes | 151 | id: notes |
| 152 | env: | 152 | env: |
| 153 | + # rickub's runner does not export GITHUB_WORKFLOW; name it here. | ||
| 154 | + WORKFLOW: Release | ||
| 153 | TAG: ${{ steps.check.outputs.tag }} | 155 | TAG: ${{ steps.check.outputs.tag }} |
| 154 | run: | | 156 | run: | |
| 155 | set -euo pipefail | 157 | set -euo pipefail |
| @@ -157,7 +159,7 @@ jobs: | |||
| 157 | echo "## rickub ${TAG}" | 159 | echo "## rickub ${TAG}" |
| 158 | echo | 160 | echo |
| 159 | echo "- Commit: \`${GITHUB_SHA}\` (\`${GITHUB_REF_NAME}\`)" | 161 | echo "- Commit: \`${GITHUB_SHA}\` (\`${GITHUB_REF_NAME}\`)" |
| 160 | - echo "- Built by \`${GITHUB_WORKFLOW}\` run #${GITHUB_RUN_NUMBER}" | 162 | + echo "- Built by \`${WORKFLOW}\` run #${GITHUB_RUN_NUMBER}" |
| 161 | echo | 163 | echo |
| 162 | echo '### Install' | 164 | echo '### Install' |
| 163 | echo | 165 | echo |