That fuck shit the fascists are using
at master 84 lines 2.2 kB view raw
1name: APK Diff 2 3on: 4 pull_request: 5 6permissions: 7 contents: read # to fetch code (actions/checkout) 8 pull-requests: write # to comment on PR 9 10jobs: 11 assemble-base: 12 if: ${{ github.repository != 'signalapp/Signal-Android' }} 13 runs-on: ubuntu-latest-8-cores 14 15 steps: 16 - uses: actions/checkout@v3 17 with: 18 submodules: true 19 ref: ${{ github.event.pull_request.base.sha }} 20 21 - name: set up JDK 17 22 uses: actions/setup-java@v3 23 with: 24 distribution: temurin 25 java-version: 17 26 cache: gradle 27 28 - name: Validate Gradle Wrapper 29 uses: gradle/wrapper-validation-action@v1 30 31 - name: Cache base apk 32 id: cache-base 33 uses: actions/cache@v3 34 with: 35 path: diffuse-base.apk 36 key: diffuse-${{ github.event.pull_request.base.sha }} 37 38 39 - name: Build with Gradle 40 if: steps.cache-base.outputs.cache-hit != 'true' 41 run: ./gradlew assemblePlayProdRelease 42 43 - name: Copy base apk 44 if: steps.cache-base.outputs.cache-hit != 'true' 45 run: mv app/build/outputs/apk/playProd/release/*arm64*.apk diffuse-base.apk 46 47 - uses: actions/checkout@v3 48 with: 49 submodules: true 50 clean: 'false' 51 52 - name: Build with Gradle 53 run: ./gradlew assemblePlayProdRelease 54 55 - name: Copy PR apk 56 run: mv app/build/outputs/apk/playProd/release/*arm64*.apk diffuse-new.apk 57 58 - id: diffuse 59 uses: usefulness/diffuse-action@v1 60 with: 61 old-file-path: diffuse-base.apk 62 new-file-path: diffuse-new.apk 63 64 - uses: peter-evans/find-comment@v2 65 id: find-comment 66 with: 67 issue-number: ${{ github.event.pull_request.number }} 68 body-includes: Diffuse output 69 70 - uses: peter-evans/create-or-update-comment@v3 71 with: 72 body: | 73 Diffuse output: 74 75 ${{ steps.diffuse.outputs.diff-gh-comment }} 76 edit-mode: replace 77 comment-id: ${{ steps.find-comment.outputs.comment-id }} 78 issue-number: ${{ github.event.pull_request.number }} 79 token: ${{ secrets.GITHUB_TOKEN }} 80 81 - uses: actions/upload-artifact@v3 82 with: 83 name: diffuse-output 84 path: ${{ steps.diffuse.outputs.diff-file }}