-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #132 from Tribler/feature/build_apk_action
- Loading branch information
Showing
4 changed files
with
55 additions
and
17 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,11 @@ | ||
name: Checkout submodules | ||
description: Checkout submodules | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- shell: bash | ||
run: | | ||
git config --global url."https://github.com/".insteadOf "[email protected]:" | ||
auth_header="$(git config --local --get http.https://github.com/.extraheader)" | ||
git submodule sync --recursive | ||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 |
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,40 @@ | ||
name: Build APK for master | ||
|
||
on: | ||
push: | ||
branches: master | ||
|
||
jobs: | ||
apk: | ||
name: Build APK | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- uses: ./.github/actions/checkout_submodules | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
|
||
- name: Build release APK | ||
run: | | ||
echo $KEYSTORE_FILE | base64 -d > app/build.keystore | ||
./gradlew assembleRelease \ | ||
-Pandroid.injected.signing.store.file=$(pwd)/app/build.keystore \ | ||
-Pandroid.injected.signing.store.password=$KEYSTORE_PASSWORD \ | ||
-Pandroid.injected.signing.key.alias=$KEY_ALIAS \ | ||
-Pandroid.injected.signing.key.password=$KEY_PASSWORD | ||
env: | ||
KEYSTORE_FILE: ${{ secrets.KEYSTORE_FILE }} | ||
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | ||
KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | ||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | ||
|
||
- name: Upload APK | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: app | ||
path: app/build/outputs/apk/release/app-release.apk |
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,9 +1,7 @@ | ||
name: apk | ||
name: Build APK for PR | ||
|
||
on: | ||
pull_request_target: | ||
push: | ||
branches: master | ||
|
||
jobs: | ||
apk: | ||
|
@@ -17,13 +15,8 @@ jobs: | |
with: | ||
ref: refs/pull/${{github.event.pull_request.number}}/merge | ||
|
||
- name: Checkout submodules | ||
shell: bash | ||
run: | | ||
git config --global url."https://github.com/".insteadOf "[email protected]:" | ||
auth_header="$(git config --local --get http.https://github.com/.extraheader)" | ||
git submodule sync --recursive | ||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 | ||
- uses: ./.github/actions/checkout_submodules | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v1 | ||
with: | ||
|
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 |
---|---|---|
|
@@ -13,13 +13,7 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Checkout submodules | ||
shell: bash | ||
run: | | ||
git config --global url."https://github.com/".insteadOf "[email protected]:" | ||
auth_header="$(git config --local --get http.https://github.com/.extraheader)" | ||
git submodule sync --recursive | ||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 | ||
- uses: ./.github/actions/checkout_submodules | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v1 | ||
|