Skip to content

Commit e9c6f4e

Browse files
SQLAdrianclaude
andcommitted
fix(ci): release.yml step if: cannot reference secrets directly
GitHub Actions rejects `if: \${{ secrets.X != '' }}` as 'Unrecognized named-value: secrets', which silently invalidated the whole workflow and prevented tag pushes from triggering a release. Drop the if: gates — the existing runtime null-check inside each script handles the no-cert case. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 4a3c814 commit e9c6f4e

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,11 @@ jobs:
7070
-p:IncludeNativeLibrariesForSelfExtract=true `
7171
-o ${{ env.PUBLISH_DIR }}
7272
73-
# ── 8. Code-sign exe (skipped if secret not configured) ──────────────
73+
# ── 8. Code-sign exe (skipped at runtime if secret not configured) ──
74+
# Note: cannot use `if: ${{ secrets.X != '' }}` — GitHub Actions does
75+
# not allow `secrets.*` in `if:` expressions. The runtime guard inside
76+
# the script handles the no-cert case instead.
7477
- name: Sign executable
75-
if: ${{ secrets.CODESIGN_CERT_BASE64 != '' }}
7678
shell: pwsh
7779
env:
7880
CERT_BASE64: ${{ secrets.CODESIGN_CERT_BASE64 }}
@@ -156,9 +158,8 @@ jobs:
156158
$setup = Get-ChildItem installer\Output -Filter "*.exe" | Select-Object -First 1
157159
Copy-Item $setup.FullName "${{ env.INSTALLER_NAME }}"
158160
159-
# ── 12. Sign installer ──────────────────────────────────────────────
161+
# ── 12. Sign installer (skipped at runtime if secret not configured)
160162
- name: Sign installer
161-
if: ${{ secrets.CODESIGN_CERT_BASE64 != '' }}
162163
shell: pwsh
163164
env:
164165
CERT_BASE64: ${{ secrets.CODESIGN_CERT_BASE64 }}

0 commit comments

Comments
 (0)