Add android build workflow

This commit is contained in:
Reckless_Satoshi 2022-07-14 10:27:14 -07:00 committed by KoalaSat
parent 0ce559f0ac
commit 340bcf8d1c
No known key found for this signature in database
GPG Key ID: 2F7F61C6146AB157

View File

@ -1,16 +1,11 @@
name: Android Build
on:
workflow_dispatch:
workflow_call:
inputs:
semver:
required: true
type: string
push:
branches: [ "main" ]
branches: [ "main" , "android-webview-app-ts"]
paths: [ "mobile", "frontend" ]
pull_request:
branches: [ "main" ]
branches: [ "main" , "android-webview-app-ts"]
paths: [ "mobile", "frontend" ]
jobs:
@ -42,35 +37,26 @@ jobs:
id: commit
uses: pr-mpt/actions-commit-hash@v1
- name: 'Upload .apk Artifact (for Release)'
- name: 'Upload APK Artifact'
uses: actions/upload-artifact@v3
if: inputs.semver != '' # If this workflow is called from release.yml
with:
name: robosats-${{ inputs.semver }}.apk
path: mobile/android/app/build/outputs/apk/release/app-release.apk
- name: 'Upload .apk Artifact (for Pre-release)'
uses: actions/upload-artifact@v3
if: inputs.semver == '' # only if this workflow is not called from a push to tag (a Release)
with:
name: robosats-${{ steps.commit.outputs.short }}.apk
path: mobile/android/app/build/outputs/apk/release/app-release.apk
name: robosats-${{ steps.commit.outputs.short }}.zip
path: mobile/android/app/build/outputs/apk/release/
- name: 'Create Pre-release'
id: create_release
if: inputs.semver == '' # only if this workflow is not called from a push to tag (a Release)
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: android-${{ steps.commit.outputs.short }}
release_name: robosats-alpha-${{ steps.commit.outputs.short }}
body_path: mobile/CHANGELOG.md
draft: false
prerelease: true
- name: 'Upload Pre-release APK Asset'
id: upload-release-asset
if: inputs.semver == '' # only if this workflow is not called from a push to tag (a Release)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}