Skip to content

Commit

Permalink
Merge pull request #8 from DennisBauer/DennisBauer-patch-1
Browse files Browse the repository at this point in the history
Create release.yml
  • Loading branch information
DennisBauer authored Sep 24, 2023
2 parents 922ee29 + 214136f commit 2d6fd92
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Android CI

on:
workflow_dispatch:
inputs:
version:
description: 'Application version'
required: true
default: '1.0.0'
prerelease:
description: 'Pre-Release?'
required: true
default: false

jobs:
build:
name: Build Signed APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Java 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Decode Keystore
id: decode_keystore
uses: timheuer/[email protected]
with:
fileName: 'android_keystore.jks'
fileDir: '/home/runner/work/RecurringExpenseTracker/RecurringExpenseTracker/app/keystore/'
encodedString: ${{ secrets.KEYSTORE }}
- name: Build APK
run: ./gradlew :app:assembleRelease -x test
env:
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
- name: Verify Signature
run: $ANDROID_SDK_ROOT/build-tools/34.0.0/apksigner verify --print-certs app/build/outputs/apk/release/RecurringExpenseTracker_${{ github.event.inputs.version }}.apk
- name: Upload APK
uses: actions/[email protected]
with:
name: RecurringExpenseTracker
path: app/build/outputs/apk/release/RecurringExpenseTracker_${{ github.event.inputs.version }}.apk
release:
name: Release APK
needs: build
runs-on: ubuntu-latest
steps:
- name: Download APK from build
uses: actions/download-artifact@v1
with:
name: RecurringExpenseTracker
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.event.inputs.version }}
name: Release v${{ github.event.inputs.version }}
draft: false
prerelease: ${{ github.event.inputs.prerelease }}
files: RecurringExpenseTracker/RecurringExpenseTracker_${{ github.event.inputs.version }}.apk

0 comments on commit 2d6fd92

Please sign in to comment.