# 一次性:把 Android release keystore 从 CI secret 导出为 artifact,便于本地/Bitwarden 备份。 # 用完务必删除:① 本 workflow 文件;② 跑出来的这次 run 的 artifact(含密钥)。 # 触发:Forgejo 网页 → Actions → Export Keystore → Run workflow(手动)。 name: Export Keystore on: workflow_dispatch: jobs: export: runs-on: mac steps: - name: Restore keystore from secret env: ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} run: | set -e mkdir -p out # 原始 base64(方便直接粘进 Bitwarden Secure Note) printf '%s' "$ANDROID_KEYSTORE_BASE64" > out/keystore.b64.txt # 解码回二进制 keystore printf '%s' "$ANDROID_KEYSTORE_BASE64" | base64 --decode > out/jiu-release.jks echo "base64 长度: $(wc -c < out/keystore.b64.txt)" echo "jks 字节数: $(wc -c < out/jiu-release.jks)" - name: Upload artifact uses: actions/upload-artifact@v3 with: name: keystore-backup path: out/