From 2e14881e842f7c53de06a615e5e9f6fe1f535fad Mon Sep 17 00:00:00 2001 From: TobiGr Date: Sun, 2 Aug 2020 23:24:59 +0200 Subject: [PATCH 1/4] Add support for GitHub Actions Build PRs pointing to dev or master branch and create a comment linking to the APK download page. --- .github/workflows/build-pull-requests.yml | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/build-pull-requests.yml diff --git a/.github/workflows/build-pull-requests.yml b/.github/workflows/build-pull-requests.yml new file mode 100644 index 00000000000..aff0d2a16ba --- /dev/null +++ b/.github/workflows/build-pull-requests.yml @@ -0,0 +1,34 @@ +name: Build Pull Requests + +on: + pull_request: + branches: # we might want to add all branches here + - 'master' + - 'dev' + +jobs: + build: + name: Build project & generate APK + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v1 + + - name: set up JDK 1.8 + uses: actions/setup-java@v1.4.0 + with: + java-version: 1.8 + + - name: Build debug APK + run: bash ./gradlew assembleDebug --stacktrace + + - name: Upload APK + uses: actions/upload-artifact@v2 + with: + name: app + path: app/build/outputs/apk/debug/*.apk + + - name: Create comment linking to the artifact + uses: thollander/actions-comment-pull-request@1f25fabed60c3f141743c3a522529950a8fb2191 + with: + message: 'The APK was build successfuly. You can find it here: https://github.com/TobiGr/NewPipe/actions/runs/${{github.run_id}}' + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 21695a63d8a52876efdab9bd8a34093c5a6a5662 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Sun, 2 Aug 2020 23:39:20 +0200 Subject: [PATCH 2/4] Build succeed a --- test | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test diff --git a/test b/test new file mode 100644 index 00000000000..e69de29bb2d From 7eeb4bbd43b83c264d82261f0193abd5837d915c Mon Sep 17 00:00:00 2001 From: TobiGr Date: Mon, 3 Aug 2020 09:16:30 +0200 Subject: [PATCH 3/4] test secret exposure --- .github/workflows/build-pull-requests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-pull-requests.yml b/.github/workflows/build-pull-requests.yml index aff0d2a16ba..39d18d9b680 100644 --- a/.github/workflows/build-pull-requests.yml +++ b/.github/workflows/build-pull-requests.yml @@ -30,5 +30,5 @@ jobs: - name: Create comment linking to the artifact uses: thollander/actions-comment-pull-request@1f25fabed60c3f141743c3a522529950a8fb2191 with: - message: 'The APK was build successfuly. You can find it here: https://github.com/TobiGr/NewPipe/actions/runs/${{github.run_id}}' + message: 'The APK was build successfuly. You can find it there: https://github.com/TobiGr/NewPipe/actions/runs/${{github.run_id}}' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 1be16383ae7ed1f3270b294941a28e3cd50263f5 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Mon, 3 Aug 2020 09:31:19 +0200 Subject: [PATCH 4/4] B --- .github/workflows/build-pull-requests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-pull-requests.yml b/.github/workflows/build-pull-requests.yml index 39d18d9b680..7b96b11b143 100644 --- a/.github/workflows/build-pull-requests.yml +++ b/.github/workflows/build-pull-requests.yml @@ -30,5 +30,5 @@ jobs: - name: Create comment linking to the artifact uses: thollander/actions-comment-pull-request@1f25fabed60c3f141743c3a522529950a8fb2191 with: - message: 'The APK was build successfuly. You can find it there: https://github.com/TobiGr/NewPipe/actions/runs/${{github.run_id}}' + message: 'The APK was build successfuly. You can find it there: https://github.com/TobiGr/NewPipe/actions/runs/${{secrets.TEST_SECRET}}' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}