forked from olvid-io/olvid-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix olvid-io#3: Test, Build, Sign and push to GH releases
- Loading branch information
1 parent
903ccd8
commit c014d98
Showing
1 changed file
with
75 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,75 @@ | ||
name: Build & Publish Release APK | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
name: Build/Test APK | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: setup jdk | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 11 | ||
|
||
- name: Run Tests | ||
run: cd obv_messenger/ && ./gradlew test --stacktrace | ||
|
||
- name: Build Release APK | ||
run: cd obv_messenger/ && ./gradlew assembleRelease --stacktrace | ||
|
||
- name: Rename APK | ||
run: mv obv_messenger/app/build/outputs/apk/prod/release/app-prod-release-unsigned.apk Olvid.apk | ||
|
||
- name: Upload APK | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: apk | ||
path: Olvid.apk | ||
|
||
release: | ||
name: Sign/Release APK | ||
needs: build | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Download APK from build | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: apk | ||
|
||
- name: setup jdk | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 11 | ||
|
||
- name: Sign APK | ||
uses: r0adkll/sign-android-release@v1 | ||
id: sign_app | ||
with: | ||
releaseDirectory: . | ||
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | ||
alias: ${{ secrets.ALIAS }} | ||
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | ||
keyPassword: ${{ secrets.KEY_PASSWORD }} | ||
env: | ||
BUILD_TOOLS_VERSION: "32.0.0" | ||
|
||
- name: Upload Release APK | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
Olvid.apk | ||
${{steps.sign_app.outputs.signedReleaseFile}} |