-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
8c56994
commit 6156db6
Showing
1 changed file
with
54 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Android CI | ||
|
||
on: | ||
push: | ||
branches: [ "main", "dev" ] | ||
pull_request: | ||
branches: [ "main", "dev" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'gradle' | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
# Here we need to decode keystore.jks from base64 string and place it | ||
# in the folder specified in the release signing configuration | ||
# - name: Decode Keystore | ||
# id: decode_keystore | ||
# uses: timheuer/[email protected] | ||
# with: | ||
# fileName: 'android_keystore.jks' | ||
# fileDir: '/home/runner/work/Chouten-Android/Chouten-Android/app/keystore/' | ||
# encodedString: ${{ secrets.KEYSTORE }} | ||
|
||
# Build and sign APK ("-x test" argument is used to skip tests) | ||
- name: Build APK | ||
run: ./gradlew :app:assembleDebug -x test | ||
#env: | ||
# SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | ||
# SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | ||
# SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} | ||
|
||
# Show information about the APK's signing certificates | ||
#- name: Verify Signature | ||
# run: $ANDROID_SDK_ROOT/build-tools/33.0.1/apksigner verify --print-certs app/build/outputs/apk/release/Chouten.apk | ||
|
||
- name: Upload a Build Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: Chouten | ||
path: "app/build/outputs/apk/debug/Chouten.apk" | ||
|
||
- name: Upload the APK to Discord | ||
shell: bash | ||
run: | | ||
curl -F "debug=@app/build/outputs/apk/debug/Chouten.apk" ${{ secrets.DISCORD_WEBHOOK_URL }} |