-
Notifications
You must be signed in to change notification settings - Fork 513
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
da52685
commit 2ff9652
Showing
2 changed files
with
40 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 |
---|---|---|
|
@@ -45,3 +45,4 @@ jobs: | |
with: | ||
name: app-debug.apk | ||
path: android/app/build/outputs/apk/debug/app-debug.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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
on: | ||
release: | ||
types: | ||
- published # We are using published instead of created because otherwise, it would never trigger if it was first created as a draft and then published. | ||
|
||
name: Upload Android Apk to Release | ||
|
||
jobs: | ||
upload-apk-to-release: | ||
name: Add Android Debug Apk to Release Assets | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: android | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Print Release Url | ||
run: echo "${{ github.event.release.html_url }}" | ||
- name: Cache Gradle packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: ${{ runner.os }}-gradle | ||
- name: Assemble Debug Apk | ||
id: assemble_debug_apk | ||
run: | | ||
./gradlew assembleDebug | ||
echo "::set-output name=debug_apk_path::$(pwd)/app/build/outputs/apk/debug/app-debug.apk" | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ${{ steps.assemble_debug_apk.outputs.debug_apk_path }} | ||
asset_name: app-debug.apk | ||
asset_content_type: application/vnd.android.package-archive |