-
Notifications
You must be signed in to change notification settings - Fork 33
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
106cc5c
commit 88f5ede
Showing
1 changed file
with
60 additions
and
61 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,68 +1,67 @@ | ||
name: Build and Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- "v*" | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
apk: | ||
name: Generate APK | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
|
||
- name: Set execution flag for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Decode Keystore File | ||
run: echo "${{ secrets.KEYSTORE_FILE }}" | base64 -d > my-release-key.keystore | ||
|
||
- name: Build APK | ||
run: ./gradlew assembleDebug \ | ||
-Pandroid.injected.signing.store.file=my-release-key.keystore \ | ||
-Pandroid.injected.signing.store.password=${{ secrets.KEYSTORE_PASSWORD }} \ | ||
-Pandroid.injected.signing.key.alias=${{ secrets.KEY_ALIAS }} \ | ||
-Pandroid.injected.signing.key.password=${{ secrets.KEY_PASSWORD }} \ | ||
--stacktrace | ||
|
||
- name: Rename APK | ||
run: mv presentation/build/outputs/apk/noAnalytics/debug/QKSMS-v*-noAnalytics-debug.apk presentation/build/outputs/apk/noAnalytics/debug/QKSMS-noAnalytics-debug.apk | ||
|
||
- name: Upload APK | ||
uses: actions/upload-artifact@v3 | ||
|
||
with: | ||
name: apk | ||
|
||
path: presentation/build/outputs/apk/noAnalytics/debug/QKSMS-noAnalytics-debug.apk | ||
apk: | ||
name: Generate APK | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
|
||
- name: Set execution flag for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Decode Keystore File | ||
run: echo "${{ secrets.KEYSTORE_FILE }}" | base64 -d > my-release-key.keystore | ||
|
||
- name: Build APK | ||
run: | | ||
./gradlew assembleDebug \ | ||
-Pandroid.injected.signing.store.file=my-release-key.keystore \ | ||
-Pandroid.injected.signing.store.password=${{ secrets.KEYSTORE_PASSWORD }} \ | ||
-Pandroid.injected.signing.key.alias=${{ secrets.KEY_ALIAS }} \ | ||
-Pandroid.injected.signing.key.password=${{ secrets.KEY_PASSWORD }} \ | ||
--stacktrace | ||
- name: Rename APK | ||
run: mv presentation/build/outputs/apk/noAnalytics/debug/QKSMS-v*-noAnalytics-debug.apk presentation/build/outputs/apk/noAnalytics/debug/QKSMS-noAnalytics-debug.apk | ||
|
||
- name: Upload APK | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: apk | ||
path: presentation/build/outputs/apk/noAnalytics/debug/QKSMS-noAnalytics-debug.apk | ||
|
||
release: | ||
name: Release APK | ||
needs: apk | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- name: Download APK from build | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: apk | ||
|
||
- name: List files in the APK directory | ||
run: ls -Rla ./ | ||
release: | ||
name: Release APK | ||
needs: apk | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- name: Download APK from build | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: apk | ||
- name: List files in the APK directory | ||
run: ls -Rla ./ | ||
|
||
- name: Create and upload release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: QKSMS-noAnalytics-debug.apk | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create and upload release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: QKSMS-noAnalytics-debug.apk | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |