diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml new file mode 100644 index 000000000..a350e2351 --- /dev/null +++ b/.github/workflows/artifacts.yml @@ -0,0 +1,20 @@ +name: add artifact links to pull request +on: + workflow_run: + workflows: ["Upload Preview APK"] + types: [completed] + +jobs: + artifacts-url-comments: + name: add artifact links to pull request + runs-on: windows-2019 + if: ${{ github.event.workflow_run.conclusion == 'success' }} + steps: + - name: add artifact links to pull request + uses: tonyhallett/artifacts-url-comments@v1.1.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + prefix: "**To test the changes in this pull request, install this apk:**" + format: "[📦 {name}]({url})" + addTo: pull diff --git a/.github/workflows/preview-apk.yml b/.github/workflows/preview-apk.yml index c75d1989f..0eb65d9d2 100644 --- a/.github/workflows/preview-apk.yml +++ b/.github/workflows/preview-apk.yml @@ -7,6 +7,10 @@ jobs: name: Upload Preview APK runs-on: ubuntu-latest steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} - uses: actions/checkout@v2 with: submodules: recursive @@ -45,5 +49,5 @@ jobs: - name: Upload APK uses: actions/upload-artifact@v2 with: - name: app.apk + name: app-preview.apk path: 'build/outputs/apk/gplay/debug/*.apk'