-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
69 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |