Passwords to env vars #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Beta | |
on: | |
push: | |
tags: | |
- "*-beta*" | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
check-style: | |
name: Release Beta Version | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
cache: gradle | |
- name: Set tag at the outputs | |
id: vars | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- name: Gradle Wrapper Validation | |
uses: gradle/actions/wrapper-validation@v3 | |
- name: Gradle Setup | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Assemble debug APK | |
run: | | |
cd husky | |
./gradlew clean assembleHuskyBetaDebug | |
- name: Decode Keystore | |
env: | |
ENCODED_STRING: ${{ secrets.HUSKY_BETA_KS }} | |
run: | | |
TMP_KS_FILE_PATH="${RUNNER_TEMP}"/keystore | |
mkdir "${TMP_KS_FILE_PATH}" | |
echo $ENCODED_STRING | base64 -di > "${TMP_KS_FILE_PATH}"/husky_beta_ks.jks | |
- name: Prepare Signing env | |
run: | | |
sudo add-apt-repository ppa:fdroid/fdroidserver | |
sudo apt-get update | |
sudo apt-get install apksigner fdroidserver --no-install-recommends | |
- name: Sign APK | |
env: | |
SIGNING_KEY_ALIAS: ${{ secrets.HUSKY_BETA_KS_ALIAS }} | |
SIGNING_KEY_PASSWORD: ${{ secrets.HUSKY_BETA_KS_ALIAS_PW }} | |
SIGNING_STORE_PASSWORD: ${{ secrets.HUSKY_BETA_KS_PW }} | |
run: | | |
TMP_KS_FILE_PATH="${RUNNER_TEMP}"/keystore | |
cd husky/app/build/outputs/apk/huskyBeta/debug/ | |
apksigner sign --ks "${TMP_KS_FILE_PATH}"/husky_beta_ks.jks \ | |
--ks-key-alias $SIGNING_KEY_ALIAS \ | |
--ks-pass $SIGNING_STORE_PASSWORD \ | |
--key-pass $SIGNING_KEY_PASSWORD \ | |
--in "husky_${{ steps.vars.outputs.tag }}.apk" \ | |
--out "husky_${{ steps.vars.outputs.tag }}_signed.apk" | |
mkdir signed | |
mv "husky_${{ steps.vars.outputs.tag }}_signed.apk" \ | |
signed/"husky_${{ steps.vars.outputs.tag }}.apk" | |
- name: Upload APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Build Artifacts | |
path: husky/app/build/outputs/apk/huskyBeta/debug/signed | |
# "husky/app/build/outputs/apk/huskyBeta/debug/husky_${{ steps.vars.outputs.tag }}.apk" |