diff --git a/.github/workflows/maven-deploy.yml b/.github/workflows/maven-deploy.yml
deleted file mode 100644
index 5551b2a8..00000000
--- a/.github/workflows/maven-deploy.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-# This workflow will build a Java project with Maven
-# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
-
-name: Deploy SNAPSHOT
-
-on:
- push:
- branches:
- - main
-jobs:
- publish:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Set up Maven Central Repository
- uses: actions/setup-java@v1
- with:
- java-version: 11
- server-id: ossrh
- server-username: MAVEN_USERNAME
- server-password: MAVEN_PASSWORD
- - name: Publish package
- run: mvn -B -f pom.xml deploy
- env:
- MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
- MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml
index 239fe74c..4686b453 100644
--- a/.github/workflows/maven-verify.yml
+++ b/.github/workflows/maven-verify.yml
@@ -1,7 +1,7 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
-name: Verify SNAPSHOT
+name: Maven Verify
on:
push:
@@ -16,15 +16,12 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- uses: actions/setup-java@v1
- with:
- java-version: 11
- - name: Cache Maven packages
- uses: actions/cache@v2
- with:
- path: ~/.m2
- key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml') }}
- restore-keys: ${{ runner.os }}-m2
+ uses: actions/setup-java@v3
+ with:
+ distribution: temurin
+ java-version: 11
+ cache: 'maven'
+
- name: Verify with Maven
run: |
mvn -B -f pom.xml clean install verify
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 9e683cda..c417311f 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -5,6 +5,13 @@ on:
types: [closed]
paths:
- '.github/project.yml'
+ concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+ defaults:
+ run:
+ shell: bash
jobs:
release:
@@ -34,14 +41,10 @@ jobs:
with:
distribution: temurin
java-version: 11
-
- - name: Cache local Maven repository
- uses: actions/cache@v3
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-maven-
+ cache: 'maven'
+ server-id: ossrh
+ server-username: MAVEN_USERNAME
+ server-password: MAVEN_PASSWORD
- name: Configure Git author
run: |
@@ -50,22 +53,13 @@ jobs:
- name: Maven release ${{steps.metadata.outputs.current-version}}
run: |
- gpg --quiet --batch --yes --decrypt --passphrase="${{secrets.GPG_PASSPHRASE}}" --output /tmp/maven-settings.xml .github/release/maven-settings.xml.gpg
- git checkout -b release
- mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}} -s /tmp/maven-settings.xml
- git checkout ${{github.base_ref}}
- git rebase release
- mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease -s /tmp/maven-settings.xml
+ mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}}
+ mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease
+ env:
+ MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
+ MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
- - name: Push changes to ${{github.base_ref}}
- uses: ad-m/github-push-action@v0.6.0
- with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
- branch: ${{github.base_ref}}
-
- - name: Push tags
- uses: ad-m/github-push-action@v0.6.0
- with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
- tags: true
- branch: ${{github.base_ref}}
\ No newline at end of file
+ - name: Push changes to ${{github.base_ref}} branch
+ run: |
+ git push
+ git push origin ${{steps.metadata.outputs.current-version}}
diff --git a/pom.xml b/pom.xml
index b339b285..b624acca 100644
--- a/pom.xml
+++ b/pom.xml
@@ -272,19 +272,6 @@
-
-
- org.apache.maven.plugins
- maven-source-plugin
-
-
- attach-sources
-
- jar-no-fork
-
-
-
-
@@ -328,6 +315,14 @@
org.apache.maven.plugins
maven-source-plugin
${version.source.plugin}
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
true