Skip to content

Merge pull request #30 from tomaytotomato/29-fix-maven-packaging-modules #15

Merge pull request #30 from tomaytotomato/29-fix-maven-packaging-modules

Merge pull request #30 from tomaytotomato/29-fix-maven-packaging-modules #15

Workflow file for this run

name: Release
on:
push:
tags:
- '*.*.*'
jobs:
release:
name: "Release"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Setup Maven Settings
uses: s4u/[email protected]
with:
servers: '[{"id": "central", "username": "${{secrets.MAVEN_USERNAME}}", "password": "${{secrets.MAVEN_PASSWORD}}"}]'
- name: Extract version from tag
id: extract_version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Build with Maven
run: mvn clean verify
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Package with Maven
run: mvn versions:set -DnewVersion=${{ env.RELEASE_VERSION }} && mvn package -DskipTests
- name: Deploy Github and Maven Central
run: mvn deploy
env:
GITHUB_USERNAME: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}