Hint https://github.com/actions/setup-java/issues/357 #16
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
# The name of workflow. GitHub displays the names on repository's actions page. | |
# If omitted, GitHub sets it to the workflow file path relative to the root of the repository. | |
# see: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions | |
name: build SwingSet3-demos | |
# Triggered when code is pushed to any branch in a repository | |
on: push | |
# Triggers the workflow on push or pull request events | |
#on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# continue-on-error: ${{ matrix.experimental }} | |
# strategy: | |
# matrix: | |
# java: [ 8, 11, 16 ] | |
# experimental: [false] | |
# include: | |
# - java: 17-ea | |
# experimental: true | |
strategy: | |
matrix: | |
java: [ 16, 17, 21 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: ${{ matrix.java }} | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
gpg-private-key: ${{ secrets.SIGN_KEY }} # has to be read directly from secrets | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE # deprecated default name used by maven-gpg-plugin | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.SIGN_KEY_PASS }} | |
- name: Build with Maven | |
# Available lifecycle phases are: | |
# validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, | |
# process-classes, generate-test-sources, process-test-sources, generate-test-resources, | |
# process-test-resources, test-compile, process-test-classes, test, | |
# prepare-package, package, | |
# pre-integration-test, integration-test, post-integration-test, verify, install, deploy, | |
# pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. | |
# run: mvn -V --batch-mode -Ddoclint=all --file pom.xml --no-transfer-progress test | |
# run: mvn -V --batch-mode package | |
run: mvn -V --batch-mode -Ddoclint=all --file pom.xml --no-transfer-progress verify | |