Skip to content

Commit 75b0839

Browse files
committed
ci: fix release workflow signing condition
1 parent b69fc78 commit 75b0839

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ concurrency:
1616
jobs:
1717
release:
1818
runs-on: ubuntu-latest
19+
env:
20+
HAS_SIGNING_SECRETS: ${{ secrets.KEYSTORE_BASE64 != '' && secrets.KEY_ALIAS != '' && secrets.KEYSTORE_PASSWORD != '' && secrets.KEY_PASSWORD != '' }}
1921
steps:
2022
- uses: actions/checkout@v4
2123
with:
@@ -36,7 +38,7 @@ jobs:
3638
run: ./gradlew --no-daemon assembleRelease
3739

3840
- name: Sign APK
39-
if: ${{ secrets.KEYSTORE_BASE64 != '' && secrets.KEY_ALIAS != '' && secrets.KEYSTORE_PASSWORD != '' && secrets.KEY_PASSWORD != '' }}
41+
if: ${{ env.HAS_SIGNING_SECRETS == 'true' }}
4042
id: sign_app
4143
uses: r0adkll/sign-android-release@v1
4244
with:
@@ -50,7 +52,10 @@ jobs:
5052
id: artifact
5153
shell: bash
5254
run: |
53-
signed_path="${{ steps.sign_app.outputs.signedReleaseFile }}"
55+
signed_path=""
56+
if [ "${HAS_SIGNING_SECRETS}" = "true" ]; then
57+
signed_path="${{ steps.sign_app.outputs.signedReleaseFile }}"
58+
fi
5459
if [ -n "$signed_path" ]; then
5560
artifact_path="$signed_path"
5661
release_body=""

0 commit comments

Comments
 (0)