Bump org.apache.maven.plugins:maven-project-info-reports-plugin (#1387) #1372
This file contains 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: Solid Java Client CD | |
on: | |
push: | |
branches: | |
- 1.0 | |
tags: | |
- inrupt-client-1.0.[0-9]+ | |
jobs: | |
deployment: | |
name: Deploy artifacts | |
runs-on: ubuntu-latest | |
permissions: | |
deployments: write | |
strategy: | |
matrix: | |
envName: ["Development", "Production"] | |
release: | |
- ${{ contains(github.ref, 'inrupt-client-') }} | |
exclude: | |
- release: false | |
envName: "Production" | |
- release: true | |
envName: "Development" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
cache: 'maven' | |
server-id: 'ossrh' | |
server-username: MAVEN_REPO_USERNAME | |
server-password: MAVEN_REPO_TOKEN | |
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
- name: Create GitHub deployment | |
uses: chrnorm/deployment-action@v2 | |
id: deployment | |
with: | |
token: ${{ github.token }} | |
environment: ${{ matrix.envName }} | |
- name: Build the code with Maven | |
run: mvn -B -ntp install -Pci | |
- name: Deploy Artifacts | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
run: mvn deploy -P publish | |
env: | |
MAVEN_REPO_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
MAVEN_REPO_TOKEN: ${{ secrets.SONATYPE_TOKEN }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
- name: Update deployment status (success) | |
if: success() | |
uses: chrnorm/deployment-status@v2 | |
with: | |
token: ${{ github.token }} | |
state: 'success' | |
deployment-id: ${{ steps.deployment.outputs.deployment_id }} | |
- name: Update deployment status (failure) | |
if: failure() | |
uses: chrnorm/deployment-status@v2 | |
with: | |
token: ${{ github.token }} | |
state: 'failure' | |
deployment-id: ${{ steps.deployment.outputs.deployment_id }} | |
- name: Sonar Analysis | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
run: mvn sonar:sonar -Dsonar.login=${{ secrets.SONARQUBE_TOKEN }} | |
site: | |
name: Publish version-specific site | |
runs-on: ubuntu-latest | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
environment: | |
name: "Documentation" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
cache: 'maven' | |
- name: Build the code with Maven | |
run: mvn -B -ntp install -Pwebsite | |
- name: Build the site with Maven | |
run: mvn -B -ntp site site:stage -Pwebsite | |
- name: Set site version | |
run: | | |
VERSION=$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout) | |
echo "VERSION_DIR=./${VERSION}/" >> $GITHUB_ENV | |
- name: Publish tagged site to GitHub pages | |
uses: peaceiris/actions-gh-pages@v4 | |
if: ${{ startsWith(github.event.ref, 'refs/tags/inrupt-client') }} | |
with: | |
keep_files: true | |
publish_dir: ./target/staging/ | |
personal_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish versioned site to GitHub pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
keep_files: true | |
publish_dir: ./target/staging/ | |
destination_dir: ${{ env.VERSION_DIR }} | |
personal_token: ${{ secrets.GITHUB_TOKEN }} | |