Skip to content

v0.1.1

v0.1.1 #3

Workflow file for this run

name: Publish
on:
release:
types: [published]
permissions:
id-token: write
contents: read
jobs:
publish:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: maven
- name: Set version from tag
run: |
TAG=${{ github.event.release.tag_name }}
mvn versions:set -DnewVersion=${TAG#v}
- name: Create Maven settings.xml
uses: s4u/[email protected]
with:
servers: '[{"id": "central", "username": "${{ secrets.MAVEN_CENTRAL_USERNAME }}", "password": "${{ secrets.MAVEN_CENTRAL_PASSWORD }}"}]'
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: Build and publish
run: mvn -B deploy -P release