62 lines
1.6 KiB
YAML
Raw Normal View History

2024-03-23 13:50:35 +01:00
name: CI-Android APK
env:
main_project_module: app
playstore_name: KeepassFidelity
on:
push:
branches: [ release ]
2024-03-23 14:09:54 +01:00
tags:
2024-03-23 14:13:37 +01:00
- '**'
2024-03-23 13:50:35 +01:00
pull_request:
branches: [ release ]
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest
2024-03-23 15:12:15 +01:00
permissions:
contents: write
2024-03-23 13:50:35 +01:00
steps:
- uses: actions/checkout@v4
2024-03-24 10:26:31 +01:00
- name: set up secrets
2024-03-24 10:23:30 +01:00
run: |
echo "${{ secrets.RELEASE_KEYSTORE }}" > keystore.asc
echo "${{ secrets.RELEASE_KEY}}" > key.acs
2024-03-24 10:28:30 +01:00
gpg -d --passphrase "${{ secrets.RELEASE_KEYSTORE_PASSWORD }}" --batch app/keystore.asc > app/keystore.properties
gpg -d --passphrase "${{ secrets.RELEASE_KEYSTORE_PASSWORD }}" --batch app/key.asc > app/key.jks
2024-03-24 10:23:30 +01:00
2024-03-23 13:59:01 +01:00
- uses: gradle/wrapper-validation-action@v2
2024-03-23 13:50:35 +01:00
- name: create and checkout branch
if: github.event_name == 'pull_request'
env:
BRANCH: ${{ github.head_ref }}
run: git checkout -B "$BRANCH"
- name: set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: "temurin"
cache: 'gradle'
- name: Build APK
run: ./gradlew assemble
2024-03-24 10:23:30 +01:00
# - name: Upload APK
# uses: actions/upload-artifact@v4
# with:
# name: app.apk
# path: app/build/outputs/apk/release/app-release.apk
2024-03-23 15:03:09 +01:00
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
2024-03-24 10:23:30 +01:00
app/build/outputs/apk/release/app-release.apk