release 0.3.3 #25
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: AOS-cd | |
on: | |
push: | |
branches: | |
- release | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: 17 | |
- name: Extract Release Version | |
run: echo "##[set-output name=version;]$(echo '${{ github.event.head_commit.message }}' | egrep -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')" | |
id: extract_version_name | |
- name: Create Properties File | |
env: | |
RELEASE_KEYSTORE: ${{ secrets.KEY_STORE_BASE_64 }} | |
KEYSTORE_PROPERTIES: ${{ secrets.KEYSTORE_PROPERTIES }} | |
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }} | |
run: | | |
echo "$RELEASE_KEYSTORE" | base64 -d > AOS/app/release.keystore | |
echo "$KEYSTORE_PROPERTIES" > AOS/keystore.properties | |
echo "$LOCAL_PROPERTIES" > AOS/local.properties | |
- name: Build Release APK | |
run: ./gradlew assembleRelease | |
working-directory: ./AOS | |
- name: Create Release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.extract_version_name.outputs.version }} | |
release_name: ${{ steps.extract_version_name.outputs.version }} | |
files: | | |
AOS/app/build/outputs/apk/release/app-release.apk | |
- name: Upload to Firebase App Distribution | |
uses: wzieba/Firebase-Distribution-Github-Action@v1 | |
with: | |
appId: ${{ secrets.FIREBASE_APP_ID }} | |
serviceCredentialsFileContent: ${{ secrets.FIREBASE_CREDENTIAL_FILE_CONTENT }} | |
groups: test | |
releaseNotesFile: AOS/release_note.txt | |
file: AOS/app/build/outputs/apk/release/app-release.apk |