From da8a476236fb27392da62dfc73f49cbdaf8edbe9 Mon Sep 17 00:00:00 2001 From: Cloudburst Date: Mon, 16 Aug 2021 12:27:45 +0200 Subject: [PATCH] separate into pre-release and pull_request --- .github/workflows/prerelease.yml | 28 +++++++++++++++++++ .../workflows/{main.yml => pull_request.yml} | 5 +--- 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/prerelease.yml rename .github/workflows/{main.yml => pull_request.yml} (77%) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml new file mode 100644 index 00000000..affef485 --- /dev/null +++ b/.github/workflows/prerelease.yml @@ -0,0 +1,28 @@ +name: Pre-release + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Run Gradle command + uses: Raul6469/android-gradle-action@2.0.0 + with: + script: assembleDebug + # In some cases, you may need to provide + # Android licence agreement id + # You can find it on your own machine under `$ANDROID_HOME/license`, + # and add the file content as a GitHub secret named `$ANDROID_LICENCE`. + # android-licence: ${{ secrets.ANDROID_LICENCE }} + + - name: Create pre-release + uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "pre-release" + prerelease: true + title: "Pre-release Build" + files: | + app/build/outputs/apk/debug/*.apk diff --git a/.github/workflows/main.yml b/.github/workflows/pull_request.yml similarity index 77% rename from .github/workflows/main.yml rename to .github/workflows/pull_request.yml index 39078d75..67d4fcc6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/pull_request.yml @@ -1,9 +1,6 @@ -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - name: Artifact Build -on: [push, pull_request] +on: [pull_request] jobs: build: