diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index f7ea61c5..dcff3d28 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -25,6 +25,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
+ - name: Set up JDK 17
+ uses: actions/setup-java@v2
+ with:
+ java-version: '17'
+ distribution: 'temurin'
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index e53ca4d4..d263389a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,53 +1,34 @@
-# This is a basic workflow to help you get started with Actions
-
name: Release to Maven Central
-# Run this manually
on:
workflow_dispatch:
inputs:
- releaseType:
- description: MAJOR, MINOR or PATCH release
- default: 'PATCH'
- dry_run:
- description: Whether to perform a dry run instead of a full release.
- default: false
+ releaseversion:
+ description: 'Release version'
+ required: true
+ default: '1.1.0'
-# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
- # This workflow contains a single job called "build"
- release:
- name: Preparing Build Environment
-
- # The type of runner that the job will run on
+ publish:
runs-on: ubuntu-latest
-
- # Steps represent a sequence of tasks that will be executed as part of the job
steps:
- - name: Set up JDK 1.8
- uses: actions/setup-java@v1.4.3
- with:
- java-version: 1.8
- gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
-
- - name: Install Maven
- uses: aahmed-se/setup-maven@v3
- with:
- maven-version: 3.6.1
-
+ - run: echo "Will start a Maven Central upload with version ${{ github.event.inputs.releaseversion }}"
- uses: actions/checkout@v2
-
- - name: Build & Test
- run: mvn -B test --file pom.xml
-
- - name: Prepare Release
- env:
- passphrase: ${{ secrets.GPG_PASSPHRASE }}
- run: mvn -B release:clean release:prepare -DRELEASE_TYPE=$INPUT_RELEASETYPE -DdryRun=$INPUT_DRY_RUN
-
- - name: Perform Release
- if: ${{ env.INPUT_DRY_RUN == false }}
+ - name: Set up Maven Central Repository
+ uses: actions/setup-java@v2
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+ server-id: ossrh
+ server-username: MAVEN_USERNAME
+ server-password: MAVEN_PASSWORD
+ gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} # Value of the GPG private key to import
+ gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
+ - name: Set projects Maven version to GitHub Action GUI set version
+ run: mvn versions:set "-DnewVersion=${{ github.event.inputs.releaseversion }}"
+ - name: Publish package
+ run: mvn -B --no-transfer-progress deploy -DskipTests=true
env:
- ossrc-username: ${{ secrets.ossrc_username }}
- ossrc-password: ${{ secrets.ossrc_password }}
- run: mvn -B release:perform
+ MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
+ MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
+ MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
diff --git a/pom.xml b/pom.xml
index 9a8f7bb4..1bacdeee 100644
--- a/pom.xml
+++ b/pom.xml
@@ -180,6 +180,12 @@
org.apache.maven.plugins
maven-gpg-plugin
3.0.1
+
+
+ --pinentry-mode
+ loopback
+
+
sign-artifacts