Skip to content

Commit da63479

Browse files
authored
fix: use env context instead of secrets in workflow if-condition (#2)
The secrets context is not available in step-level if: conditions, causing GitHub Actions to reject the workflow file. Reference the secret via an env var instead, and simplify RELEASE_STORE_FILE to a static value since Gradle already validates signing credentials.
1 parent 3647515 commit da63479

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ jobs:
2727
- uses: gradle/actions/setup-gradle@v4
2828

2929
- name: Decode release keystore
30-
if: ${{ secrets.RELEASE_KEYSTORE_BASE64 != '' }}
30+
if: env.RELEASE_KEYSTORE_BASE64 != ''
3131
run: echo "$RELEASE_KEYSTORE_BASE64" | base64 -d > focaccia.jks
3232
env:
3333
RELEASE_KEYSTORE_BASE64: ${{ secrets.RELEASE_KEYSTORE_BASE64 }}
3434

3535
- run: npx --yes -p semantic-release@24 -p @semantic-release/exec@6 semantic-release
3636
env:
3737
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38-
RELEASE_STORE_FILE: ${{ secrets.RELEASE_KEYSTORE_BASE64 != '' && 'focaccia.jks' || '' }}
38+
RELEASE_STORE_FILE: focaccia.jks
3939
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
4040
RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
4141
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}

0 commit comments

Comments
 (0)