Skip to content

Release CI

Release CI #39

Workflow file for this run

name: Release CI
on:
push:
branches: [ "master" ]
paths:
- version.properties
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: gradle
- uses: ashutoshgngwr/validate-fastlane-supply-metadata@v2
with:
fastlaneDir: ./metadata
- name: Write sign info
run: |
if [ ! -z "${{ secrets.KEYSTORE }}" ]; then
echo storePassword='${{ secrets.KEYSTORE_PASSWORD }}' >> keystore.properties
echo keyAlias='${{ secrets.KEY_ALIAS }}' >> keystore.properties
echo keyPassword='${{ secrets.KEY_PASSWORD }}' >> keystore.properties
echo storeFile='${{ github.workspace }}/key.jks' >> keystore.properties
echo ${{ secrets.KEYSTORE }} | base64 --decode > ${{ github.workspace }}/key.jks
fi
- name: Build with Gradle
run: chmod +x gradlew && ./gradlew assembleRelease
- name: Save version
id: save_version
run: |
VERSION_NAME=$(./gradlew printVersion -q)
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_OUTPUT
- uses: ncipollo/release-action@v1
with:
tag: ${{ steps.save_version.outputs.VERSION_NAME }}
artifacts: "app/build/outputs/apk/release/app-release.apk"
generateReleaseNotes: true
token: ${{ secrets.GITHUB_TOKEN }}