Create release.yml

This commit is contained in:
oqba26 authored and GitHub committed 2026-07-31 21:47:51 +03:30
1 parent ddf8a3d815
commit 02a0006542
1 file changed
+45
+45
View File
@@ -0,0 +1,45 @@
name: Android Release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Decode Keystore
run: |
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -di > app/release-key.jks
- name: Build Release APK
env:
RELEASE_STORE_FILE: release-key.jks
RELEASE_STORE_PASSWORD: ${{ secrets.RELEASE_STORE_PASSWORD }}
RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
run: ./gradlew assembleRelease
- name: Rename APK
run: |
mv app/build/outputs/apk/release/app-release.apk app/build/outputs/apk/release/MonthlyPaymentApp-${{ github.ref_name }}.apk
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: app/build/outputs/apk/release/MonthlyPaymentApp-${{ github.ref_name }}.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}