chore(deps): update dependency org.apache.maven.plugins:maven-resourc… #2029
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
| on: | |
| push: | |
| branches: | |
| - master | |
| - sq-10 | |
| pull_request: | |
| branches: | |
| - master | |
| release: | |
| types: | |
| - published | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # 9.9 LTS | |
| - SONAR_SERVER_VERSION: 9.9.9.104369 | |
| SONAR_SERVER_JAVA_VERSION: 17 | |
| # 10.x | |
| - SONAR_SERVER_VERSION: 10.7.0.96327 | |
| SONAR_SERVER_JAVA_VERSION: 17 | |
| # 25.x | |
| - SONAR_SERVER_VERSION: 25.10.0.114319 | |
| SONAR_SERVER_JAVA_VERSION: 17 | |
| # https://mvnrepository.com/artifact/org.sonarsource.sonarqube/sonar-core | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{ matrix.SONAR_SERVER_JAVA_VERSION }} | |
| distribution: temurin | |
| cache: 'maven' | |
| - name: Cache SonarCloud packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.sonar/cache | |
| ~/.sonar/orchestrator/cache | |
| key: ${{ runner.os }}-sonar-${{ matrix.SONAR_SERVER_VERSION }} | |
| restore-keys: ${{ runner.os }}-sonar-${{ matrix.SONAR_SERVER_VERSION }} | |
| - name: Build | |
| run: | | |
| ./mvnw verify -B -e -V \ | |
| -Dsonar.server.version=${{ matrix.SONAR_SERVER_VERSION }} \ | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| # Forked repos do not have the secrets to deploy so this would fail | |
| if: ( github.event_name == 'release' || ( github.event_name == 'push' && github.ref == 'refs/heads/master' )) && github.repository == 'spotbugs/sonar-findbugs' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 17 | |
| distribution: temurin | |
| cache: 'maven' | |
| server-id: central | |
| server-username: SONATYPE_USERNAME | |
| server-password: SONATYPE_TOKEN | |
| gpg-private-key: ${{ secrets.SIGNING_KEY }} | |
| gpg-passphrase: GPG_PASSPHRASE | |
| - name: Deploy artifacts to Maven Central | |
| run: | | |
| ./mvnw clean deploy -B -e -P deploy -DskipTests | |
| env: | |
| SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
| SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }} | |
| GPG_PASSPHRASE: ${{ secrets.SIGNING_PASSWORD }} | |
| CI: true | |
| - name: Get release URL | |
| if: github.event_name == 'release' | |
| id: get_release | |
| uses: bruceadams/get-release@v1.3.2 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - name: Upload .jar file to GitHub Release | |
| if: github.event_name == 'release' | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.get_release.outputs.upload_url }} | |
| asset_path: ./target/sonar-findbugs-plugin.jar | |
| asset_name: sonar-findbugs-plugin-${{ github.event.release.tag_name }}.jar | |
| asset_content_type: application/zip |