Bump org.apache.maven.plugins:maven-toolchains-plugin #779
Workflow file for this run
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: CI build | |
# Run this workflow every time a new commit pushed to your repository | |
on: | |
push: | |
branches: [ '**' ] | |
tags-ignore: [ '**' ] | |
pull_request: | |
types: [ opened, synchronize, reopened ] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup GPG | |
if: env.GPG_SECRET_KEYS != null && env.GPG_OWNERTRUST != null | |
run: | | |
cat <(echo -e "${{ env.GPG_SECRET_KEYS }}") | base64 --decode | gpg --batch --import | |
cat <(echo -e "${{ env.GPG_OWNERTRUST }}") | base64 --decode | gpg --batch --import-ownertrust | |
env: | |
GPG_SECRET_KEYS: ${{ secrets.GPG_SECRET_KEYS }} | |
GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }} | |
- name: Setup Graphviz | |
run: sudo apt-get install graphviz | |
- name: Set up JDK 8 for compilation | |
id: setup-java-8 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 8 | |
- name: Set up JDK 21 | |
id: setup-java-21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 21 | |
- name: Setup maven cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-m2-repo-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2-repo- | |
- name: Perform build | |
run: .github/scripts/build.sh | |
shell: bash | |
env: | |
JAVA_8_HOME: ${{ steps.setup-java-8.outputs.path }} | |
JAVA_21_HOME: ${{ steps.setup-java-21.outputs.path }} | |
MAVEN_CLI_OPTS: --settings .github/mvn-settings.xml --global-toolchains .github/mvn-toolchains.xml | |
GPG_EXECUTABLE: /usr/bin/gpg | |
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
- name: Publish test coverage | |
if: env.COVERALLS_REPO_TOKEN != null | |
run: ./mvnw --batch-mode -DrepoToken=${{ env.COVERALLS_REPO_TOKEN }} jacoco:report coveralls:report | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
release: | |
name: "Release" | |
runs-on: ubuntu-latest | |
needs: build | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
steps: | |
- name: Check out code | |
if: env.GH_TOKEN != null | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ env.GH_TOKEN }} | |
- name: Set up CI git user | |
if: env.GH_TOKEN != null | |
run: | | |
git config user.name "Talsma CI" | |
git config user.email "ci-user@talsma-ict.nl" | |
- name: Set up JDK | |
if: env.GH_TOKEN != null | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 21 | |
- name: Set up maven cache | |
if: env.GH_TOKEN != null | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-m2-repo-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2-repo- | |
- name: Perform optional release | |
if: env.GH_TOKEN != null | |
run: .github/scripts/release.sh | |
shell: bash | |
env: | |
MAVEN_CLI_OPTS: --settings .github/mvn-settings.xml |