ci: stop exposing the checkout token and the keystore to later steps

Set persist-credentials: false so the contents:write token is not left
in .git/config where every later step (including the Gradle build) could
read it, and delete the decoded keystore once signing is done.
This commit is contained in:
austinried
2026-10-08 18:52:44 +00:00
parent 5c219c9f06
commit fded9949af
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -16,6 +16,8 @@ jobs:
timeout-minutes: 60
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: cachix/install-nix-action@13d8dd58da0234aa297dedd986986ccb8e7f3e24 # v31.11.1
- uses: nix-community/cache-nix-action@7df957e333c1e5da7721f60227dbba6d06080569 # v7.0.2
with:
+5
View File
@@ -17,6 +17,8 @@ jobs:
timeout-minutes: 60
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: cachix/install-nix-action@13d8dd58da0234aa297dedd986986ccb8e7f3e24 # v31.11.1
- uses: nix-community/cache-nix-action@7df957e333c1e5da7721f60227dbba6d06080569 # v7.0.2
with:
@@ -40,6 +42,9 @@ jobs:
RELEASE_KEY_ALIAS: ${{ steps.signing.outputs.alias }}
RELEASE_KEY_PASSWORD: ${{ secrets.SUBTRACKS_UPLOAD_KEY_PASSWORD }}
run: nix develop --command gradle :app:assembleRelease :app:bundleRelease --no-daemon
- name: Remove signing keystore
if: always()
run: rm -f "$RUNNER_TEMP/release.keystore"
- name: Read version code
id: version
run: echo "code=$(grep -oP 'versionCode = \K\d+' app/build.gradle.kts)" >> "$GITHUB_OUTPUT"