Skip to content

Commit 1cd2f23

Browse files
Decode keystore from base64 in nightly workflow
The nightly release workflow has been updated to decode the keystore from a base64 secret. Previously, the workflow relied on a different secret (`SIGNINGKEY_BASE64`) and set environment variables at the job level. This change introduces a dedicated step to decode the `KEYSTORE_BASE64` secret into a `keystore.jks` file. The environment variables required for signing are now scoped to this decoding step and the subsequent build step, improving the clarity and security of the signing process.
1 parent ddca4df commit 1cd2f23

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/nightly-release.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ jobs:
2525
build:
2626
name: Build, Sign & Release
2727
runs-on: ubuntu-latest
28-
env:
29-
KEY_STORE_FILE: ${{ secrets.SIGNINGKEY_BASE64 }} # optional if using a file from env
30-
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
31-
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
32-
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
3328

3429
needs: release
3530
steps:
@@ -51,10 +46,17 @@ jobs:
5146
- name: Stop Gradle daemons
5247
run: ./gradlew --stop
5348

49+
- name: Decode keystore
50+
run: echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > keystore.jks
51+
5452
- name: Build with Gradle
5553
run: ./gradlew clean assembleNightlyRelease --refresh-dependencies --no-daemon
5654
env:
5755
JAVA_TOOL_OPTIONS: "-Dhttps.protocols=TLSv1.2"
56+
KEY_STORE_FILE: keystore.jks
57+
KEY_STORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
58+
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
59+
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
5860

5961
- name: Extract Version
6062
id: extract_version

0 commit comments

Comments
 (0)