chore(deps): Update Gradle to v9.5.1 #101
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: | |
| release: | |
| types: [ released, prereleased ] | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.event.number || github.ref }}" | |
| cancel-in-progress: true | |
| env: | |
| ORG_GRADLE_PROJECT_release: ${{ github.event_name == 'release' }} | |
| jobs: | |
| action: | |
| name: "Action" | |
| # Only run on PRs if the source branch is on someone else's repo | |
| if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: "Checkout Repository" | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| fetch-tags: true | |
| fetch-depth: 0 | |
| - name: "Checkout CI Scripts" | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| repository: xpdustry/.github | |
| path: .xpdustry-ci | |
| sparse-checkout: scripts | |
| - name: "Setup Java 25" | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 | |
| with: | |
| java-version: "25" | |
| distribution: "temurin" | |
| - name: "Setup Gradle" | |
| uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6 | |
| - name: "Get And Validate Version" | |
| id: version | |
| run: | | |
| version="$(./gradlew properties -q | grep '^version:' | cut -d ':' -f 2 | xargs)" | |
| .xpdustry-ci/scripts/version-validate.sh "$version" "$ORG_GRADLE_PROJECT_release" | |
| echo "version=${version%-SNAPSHOT}" >> "$GITHUB_OUTPUT" | |
| - name: "Build Gradle" | |
| run: ./gradlew build dist | |
| - name: "Upload Artifacts" | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: artifacts | |
| path: "build/tmp/dist/*.jar" | |
| if-no-files-found: error | |
| - name: "Upload Build Results" | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: build-results | |
| path: | | |
| **/build/test-results/test/TEST-*.xml | |
| **/build/reports/ | |
| - name: "Publish to GitHub" | |
| if: ${{ github.event_name == 'release' }} | |
| uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3 | |
| with: | |
| files: "build/tmp/dist/*.jar" | |
| - name: "Update Changelog" | |
| if: ${{ github.event_name == 'release' }} | |
| uses: stefanzweifel/changelog-updater-action@a938690fad7edf25368f37e43a1ed1b34303eb36 # v1 | |
| with: | |
| latest-version: ${{ github.event.release.tag_name }} | |
| release-notes: ${{ github.event.release.body }} | |
| - name: "Bump Version" | |
| if: ${{ github.event_name == 'release' }} | |
| run: .xpdustry-ci/scripts/version-bump.sh "build.gradle.kts" "${{ steps.version.outputs.version }}" | |
| - name: "Commit Release Changes" | |
| if: ${{ github.event_name == 'release' }} | |
| uses: planetscale/ghcommit-action@25309d8005ac7c3bcd61d3fe19b69e0fe47dbdde # v0.2.20 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| commit_message: "chore(release): Post v${{ steps.version.outputs.version }} changes" | |
| repo: ${{ github.repository }} | |
| branch: ${{ github.event.release.target_commitish }} | |
| file_pattern: "build.gradle.kts CHANGELOG.md" |