From 3aa0ee76dcf72e192339f1cb8e0b1537bdc5d458 Mon Sep 17 00:00:00 2001 From: SoundDrill31 <84176052+sounddrill31@users.noreply.github.com> Date: Wed, 12 Jul 2023 09:20:53 +0530 Subject: [PATCH 1/2] Create android.yml --- .github/workflows/android.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/android.yml diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml new file mode 100644 index 0000000..6926b65 --- /dev/null +++ b/.github/workflows/android.yml @@ -0,0 +1,36 @@ +name: Android CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + workflow_dispatch: + + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '8' + distribution: 'zulu' + cache: gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build && ./gradlew shadowJar + + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + name: App-Artifact + path: | + build/libs/*.jar + # ${{steps.sign_app.outputs.signedReleaseFile}} From 1fc5510ae274d3641cb9f9dadf14126b78345eef Mon Sep 17 00:00:00 2001 From: SoundDrill31 <84176052+sounddrill31@users.noreply.github.com> Date: Wed, 12 Jul 2023 09:27:30 +0530 Subject: [PATCH 2/2] Update android.yml Github actions migration. This commit enables release upload. Change draft to true if needed(line 45). You will need to make repo permission changes to use this. You have to go to repository settings, into General under actions tab. Here, you need to allow read and write scope under Workflow permissions. --- .github/workflows/android.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 6926b65..9179c27 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -34,3 +34,14 @@ jobs: path: | build/libs/*.jar # ${{steps.sign_app.outputs.signedReleaseFile}} + - name: Upload to Release + uses: xresloader/upload-to-github-release@v1 + with: + file: | + build/libs/*.jar + # ${{steps.sign_app.outputs.signedReleaseFile}} + name: ${{ github.pull_request_target }} ${{ github.GITHUB_BASE_REF }} ${{ github.run_id }} + tag_name: ${{ github.run_id }} ${{ github.pull_request_target }} + draft: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}