ci: gate optional release steps on env vars, not the secrets context
Mirror release tags to GitHub build bridge / Mirror tag to GitHub (push) Successful in 18s
Mirror release tags to GitHub build bridge / Mirror tag to GitHub (push) Successful in 18s
GitHub Actions rejects the secrets context in if: conditions; the workflow failed validation on push. Mirror build.yml's pattern of copying the secret into step env and gating on that.
This commit is contained in:
@@ -73,7 +73,8 @@ jobs:
|
|||||||
- name: Upload symbols to bugs.plezy.app
|
- name: Upload symbols to bugs.plezy.app
|
||||||
# Only when this fork has been given the admin token (the production
|
# Only when this fork has been given the admin token (the production
|
||||||
# token lives on edde746/plezy, which is not the build bridge).
|
# token lives on edde746/plezy, which is not the build bridge).
|
||||||
if: secrets.BUGS_ADMIN_TOKEN != ''
|
# The secrets context is unavailable in `if`, so gate on the env copy.
|
||||||
|
if: env.BUGS_ADMIN_TOKEN != ''
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
env:
|
env:
|
||||||
BUGS_ADMIN_TOKEN: ${{ secrets.BUGS_ADMIN_TOKEN }}
|
BUGS_ADMIN_TOKEN: ${{ secrets.BUGS_ADMIN_TOKEN }}
|
||||||
@@ -92,7 +93,7 @@ jobs:
|
|||||||
run: .\windows\build-installer.ps1 -X64BuildDir "build\windows\x64\runner\Release" -Version "${{ steps.version.outputs.version }}"
|
run: .\windows\build-installer.ps1 -X64BuildDir "build\windows\x64\runner\Release" -Version "${{ steps.version.outputs.version }}"
|
||||||
|
|
||||||
- name: Sign installer for WinSparkle (EdDSA)
|
- name: Sign installer for WinSparkle (EdDSA)
|
||||||
if: secrets.SPARKLE_PRIVATE_KEY != ''
|
if: env.SPARKLE_PRIVATE_KEY != ''
|
||||||
env:
|
env:
|
||||||
SPARKLE_PRIVATE_KEY: ${{ secrets.SPARKLE_PRIVATE_KEY }}
|
SPARKLE_PRIVATE_KEY: ${{ secrets.SPARKLE_PRIVATE_KEY }}
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|||||||
Reference in New Issue
Block a user