Skip to content

Commit

Permalink
Merge branch 'ci'
Browse files Browse the repository at this point in the history
  • Loading branch information
Lambada10 committed Jul 14, 2024
2 parents c806e4f + 12397cf commit e3133b8
Showing 1 changed file with 69 additions and 43 deletions.
112 changes: 69 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,69 @@
name: Build signed release APK

on:
push:
branches:
- '**'
pull_request:
branches:
- '**'

jobs:
build:
runs-on: ubuntu-latest

env:
RELEASE_STORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEYSTORE_ALIAS }}
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
KEYSTORE_BASE_64: ${{ secrets.KEYSTORE_BASE_64 }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'

- name: Set up signing key
run: |
base64 -d <<< $KEYSTORE_BASE_64 > release.keystore
echo "RELEASE_STORE_FILE=$(realpath release.keystore)" >> $GITHUB_ENV
- name: Build release APK
run: ./gradlew assembleRelea

- name: Upload release APK
uses: actions/upload-artifact@v2
with:
name: app-release
path: ./app/build/outputs/apk/release/app-release.apk
name: Build APK

on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
workflow_dispatch:


jobs:
build-debug:
name: Build debug APK
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'

- name: Build debug APK
run: ./gradlew assembleDebug

- name: Upload debug APK
uses: actions/upload-artifact@v2
with:
name: app-debug.apk
path: ./app/build/outputs/apk/debug/app-debug.apk

build-release:
name: Build signed release APK
runs-on: ubuntu-latest

env:
RELEASE_STORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEYSTORE_ALIAS }}
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
KEYSTORE_BASE_64: ${{ secrets.KEYSTORE_BASE_64 }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'

- name: Set up signing key
run: |
base64 -d <<< $KEYSTORE_BASE_64 > release.keystore
echo "RELEASE_STORE_FILE=$(realpath release.keystore)" >> $GITHUB_ENV
- name: Build release APK
run: ./gradlew assembleRelease

- name: Upload release APK
uses: actions/upload-artifact@v2
with:
name: app-release.apk
path: ./app/build/outputs/apk/release/app-release.apk

0 comments on commit e3133b8

Please sign in to comment.