better this level #890
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: build | |
on: | |
push: | |
branches: [ main, "REL-*" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
MAVEN_OPTS: '-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
cache: maven | |
server-id: vpro-ossrh | |
server-username: SONATYPE_USERNAME | |
server-password: SONATYPE_PASSWORD | |
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }} | |
gpg-passphrase: GPG_SECRET_KEY_PASSPHRASE | |
- name: Build with Maven | |
run: mvn -U -B -Possrh deploy --file pom.xml -Dgpg.skip=false | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
GPG_SECRET_KEY_PASSPHRASE: ${{ secrets.GPG_SECRET_KEY_PASSPHRASE }} | |
github_packages: | |
runs-on: ubuntu-latest | |
env: | |
MAVEN_OPTS: '-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
cache: maven | |
- name: Publish to github packages | |
run: mvn -U -B -Pgithub deploy -Dgpg.skip=false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |