Skip to content

Fix release name and missing authenticator APK (#47) #14

Fix release name and missing authenticator APK (#47)

Fix release name and missing authenticator APK (#47) #14

Workflow file for this run

name: Nightly
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu'
- name: Set sha_short
id: vars
run: |
echo "commit_count=$(git rev-list --count master)" >> $GITHUB_OUTPUT
echo "sha_short=$(git rev-parse --short master)" >> $GITHUB_OUTPUT
- name: Assemble with Gradle
run: |
./gradlew -PcommitCount=${{ steps.vars.outputs.commit_count }} -PcommitHash=${{ steps.vars.outputs.sha_short }} -PstorePassword="${{ secrets.NIGHTLY_KEYSTORE_PASSWORD }}" -PkeyPassword="${{ secrets.NIGHTLY_KEYSTORE_PASSWORD }}" assembleNightlySigned
mv authenticator/build/outputs/apk/nightly/signed/authenticator-nightly-signed.apk authenticator-${{ steps.vars.outputs.sha_short }}.apk
mv companion/build/outputs/apk/nightly/signed/companion-nightly-signed.apk companion-${{ steps.vars.outputs.sha_short }}.apk
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
authenticator-${{ steps.vars.outputs.sha_short }}.apk
companion-${{ steps.vars.outputs.sha_short }}.apk
name: Nightly Release (${{ steps.vars.outputs.sha_short }})
tag_name: nightly-${{ steps.vars.outputs.sha_short }}
body: |
Nightly build for commit ${{ steps.vars.outputs.sha_short }}.
draft: false
prerelease: true
fail_on_unmatched_files: true
preserve_order: true