chore(deps): update dependency semantic-release to v25.0.2 #394
Workflow file for this run
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 PR | |
| on: [pull_request] | |
| permissions: | |
| contents: write | |
| checks: write | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| build_pr: | |
| if: github.repository_owner == 'OneLiteFeatherNET' | |
| name: Build Pull Request Branch | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| ONELITEFEATHER_MAVEN_USERNAME: ${{ secrets.ONELITEFEATHER_MAVEN_USERNAME }} | |
| ONELITEFEATHER_MAVEN_PASSWORD: ${{ secrets.ONELITEFEATHER_MAVEN_PASSWORD }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v5 | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 24 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Build on ${{ matrix.os }} | |
| run: ./gradlew clean build test | |
| - name: Publish Test Results | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| if: always() && matrix.os == 'ubuntu-latest' | |
| with: | |
| files: "**/build/test-results/test/TEST-*.xml" | |
| check_name: "Test Results" | |
| comment_title: "Unit Test Results" | |
| - name: Upload Test Report | |
| uses: actions/upload-artifact@v5 | |
| if: always() && matrix.os == 'ubuntu-latest' | |
| with: | |
| name: test-report | |
| path: build/reports/tests/test/ | |
| - name: Upload Coverage Reports | |
| uses: actions/upload-artifact@v5 | |
| if: always() && matrix.os == 'ubuntu-latest' | |
| with: | |
| name: coverage-report | |
| path: build/reports/jacoco/test/ | |
| upload_jar_and_comment: | |
| name: Upload JAR and comment PR | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| needs: build_pr | |
| if: contains(github.event.pull_request.labels.*.name, 'publish-pr') | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v5 | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 24 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Build | |
| run: ./gradlew clean build test | |
| - name: Upload JAR for PR | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: pr-jar | |
| path: build/libs/*.jar | |
| - name: Get JAR Artifact Download URL | |
| id: get-artifact-url | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const runId = context.runId; | |
| const artifacts = await github.rest.actions.listWorkflowRunArtifacts({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| run_id: runId | |
| }); | |
| const jarArtifact = artifacts.data.artifacts.find(a => a.name === 'pr-jar'); | |
| if (!jarArtifact) throw new Error('pr-jar artifact not found'); | |
| const url = jarArtifact.archive_download_url; | |
| core.setOutput('jar_url', url); | |
| - name: Create or Update PR Comment with direct JAR download link | |
| uses: peter-evans/create-or-update-comment@v5 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| :package: A new JAR build is available! | |
| [Download the JAR directly](${{ steps.get-artifact-url.outputs.jar_url }}) | |
| Note: The download link is valid for a limited time and requires GitHub authentication. | |
| edit-mode: replace | |
| comment-id: pr-jar-artifact-link |