Merge pull request #4 from hacks1ash/version-updates #16
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: Publish Package | |
on: | |
push: | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
publish: | |
name: Publish Maven Package | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
strategy: | |
matrix: | |
java: [ '21' ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Identify Version | |
id: version | |
run: | | |
TAG=${{ github.ref_name }} | |
TAG=${TAG//v/} | |
echo "PACKAGE_VERSION=$TAG" >> $GITHUB_OUTPUT | |
- name: Set up Java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'temurin' | |
cache: gradle | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@ccb4328a959376b642e027874838f60f8e596de3 | |
- name: Publish package | |
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 | |
with: | |
arguments: publish | |
env: | |
PACKAGE_VERSION: ${{ steps.version.outputs.PACKAGE_VERSION }} | |
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | |
SONARTYPE_USERNAME: ${{ secrets.SONARTYPE_USERNAME }} | |
SONARTYPE_PASSWORD: ${{ secrets.SONARTYPE_PASSWORD }} |