[patch] Gradle Libraries Update #2919
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| tags-ignore: | |
| - '**' | |
| pull_request_review: | |
| workflow_dispatch: | |
| jobs: | |
| build-job: | |
| name: "Build" | |
| runs-on: ubuntu-22.04 | |
| concurrency: | |
| group: ${{ github.ref }} | |
| env: | |
| GH_TOKEN: ${{ secrets.TESTMINTS_PAT }} | |
| GITHUB_TOKEN: ${{ secrets.TESTMINTS_PAT }} | |
| GRGIT_USER: ${{ secrets.TESTMINTS_PAT }} | |
| ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }} | |
| ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} | |
| SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
| SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
| steps: | |
| - run: sudo apt-get remove google-chrome-stable | |
| - run: sudo rm -r /usr/bin/chromium | |
| - run: sudo rm -r /usr/bin/chromium-browser | |
| - name: Setup firefox | |
| id: setup-firefox | |
| uses: browser-actions/setup-firefox@v1 | |
| with: | |
| firefox-version: latest | |
| - run: echo "FIREFOX_BINARY=$(which firefox)" >> $GITHUB_ENV | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set Up Git User | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "6215634+robertfmurdock@users.noreply.github.com" | |
| - uses: testspace-com/setup-testspace@v1 | |
| if: ${{ github.ref == 'refs/heads/master' }} | |
| with: | |
| domain: robertfmurdock | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 21 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| cache-read-only: ${{ github.ref != 'refs/heads/master' }} | |
| - name: Check Fingerprint 🔨 | |
| continue-on-error: true | |
| run: | | |
| export PREVIOUS_VERSION=$(./gradlew previousVersion -q) | |
| gh release download "$PREVIOUS_VERSION" -p "aggregate-fingerprint.txt" -O build/prev-aggregate-fingerprint.txt || true | |
| ./gradlew -q compareAggregateFingerprints \ | |
| -Pversion=$PREVIOUS_VERSION \ | |
| -PfingerprintCompareToFile=build/prev-aggregate-fingerprint.txt \ | |
| && echo "FINGERPRINT_MATCHES_PREVIOUS=true" >> "$GITHUB_ENV" \ | |
| || echo "FINGERPRINT_MATCHES_PREVIOUS=false" >> "$GITHUB_ENV" | |
| - name: Diff Fingerprint Manifest 📂 | |
| if: ${{ env.FINGERPRINT_MATCHES_PREVIOUS == 'false' }} | |
| continue-on-error: true | |
| run: | | |
| export PREVIOUS_VERSION=$(./gradlew previousVersion -q) | |
| gh release download "$PREVIOUS_VERSION" -p "aggregate-fingerprint-manifest.log" -O build/prev-aggregate-fingerprint-manifest.log || true | |
| diff -u build/prev-aggregate-fingerprint-manifest.log build/aggregate-fingerprint-manifest.log \ | |
| && echo "UNEXPECTED: aggregate log matches release $PREVIOUS_VERSION" | |
| - name: Generate Version 🔢 | |
| env: | |
| DISABLE_DETACHED: ${{ github.ref == 'refs/heads/master' }} | |
| run: ./gradlew calculateVersion -PexportToGithub=true -PtaggerForceSnapshot=${{ env.FINGERPRINT_MATCHES_PREVIOUS }} --scan | |
| - name: Build 🔨 | |
| env: | |
| DISABLE_DETACHED: ${{ github.ref == 'refs/heads/master' }} | |
| run: ./gradlew assemble check -Pversion=${{ env.TAGGER_VERSION }} --no-configuration-cache --scan | |
| - name: Release 🙏 | |
| run: ./gradlew release -Pversion=${{ env.TAGGER_VERSION }} -Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }} --no-configuration-cache --scan | |
| - name: Include fingerprint | |
| continue-on-error: true | |
| run: | | |
| gh release upload ${{ env.TAGGER_VERSION }} \ | |
| build/aggregate-fingerprint.txt \ | |
| build/aggregate-fingerprint-manifest.log \ | |
| --clobber | |
| - name: Update Contributions | |
| uses: robertfmurdock/coupling-contribution-action@v3 | |
| with: | |
| save-contribution: ${{ github.ref == 'refs/heads/master' }} | |
| cli-type: js | |
| coupling-secret: ${{ secrets.COUPLING_API_PARTY_SECRET }} | |
| party-id: 9df8b8ef-f10f-4b75-bde1-d691c148378c | |
| contribution-file: build/digger/current.json | |
| cycle-time-from-first-commit: true | |
| - name: Push result to Testspace server | |
| if: ${{ github.ref == 'refs/heads/master' && always()}} | |
| run: | | |
| testspace $(find . -path *test-results* -name *.xml) | |
| - name: Collect Test Results | |
| if: ${{ always() }} | |
| run: ./gradlew collectResults | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ always() }} | |
| with: | |
| name: test-output | |
| path: | | |
| build/test-output/ |