From 55358d87055086193f243b33516bd629887f676c Mon Sep 17 00:00:00 2001 From: KoalaSat Date: Fri, 23 Sep 2022 16:46:42 +0200 Subject: [PATCH] Revert "Add android build workflow" This reverts commit 340bcf8d1c8703af31dddf12a8762d39a967b160. --- .github/workflows/android-build.yml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml index a7fe8b405..9656338e5 100644 --- a/.github/workflows/android-build.yml +++ b/.github/workflows/android-build.yml @@ -1,11 +1,16 @@ name: Android Build on: workflow_dispatch: + workflow_call: + inputs: + semver: + required: true + type: string push: - branches: [ "main" , "android-webview-app-ts"] + branches: [ "main" ] paths: [ "mobile", "frontend" ] pull_request: - branches: [ "main" , "android-webview-app-ts"] + branches: [ "main" ] paths: [ "mobile", "frontend" ] jobs: @@ -37,26 +42,35 @@ jobs: id: commit uses: pr-mpt/actions-commit-hash@v1 - - name: 'Upload APK Artifact' + - name: 'Upload .apk Artifact (for Release)' uses: actions/upload-artifact@v3 + if: inputs.semver != '' # If this workflow is called from release.yml with: - name: robosats-${{ steps.commit.outputs.short }}.zip - path: mobile/android/app/build/outputs/apk/release/ + 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: '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 }}