diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 8f4798c..2e747fc 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -1,12 +1,6 @@
name: Publish to Maven Central
on:
- workflow_dispatch:
- inputs:
- release-version:
- description: 'Release version (e.g., 1.0.0)'
- required: false
- type: string
release:
types: [ created ]
@@ -26,7 +20,12 @@ jobs:
uses: actions/setup-java@v4
with:
java-version: '21'
- distribution: 'corretto'
+ distribution: corretto
+ server-id: central
+ server-username: SERVER_USERNAME
+ server-password: SERVER_PASSWORD
+ gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
+ gpg-passphrase: GPG_PASSPHRASE
- name: Set up Python
uses: actions/setup-python@v5
@@ -41,51 +40,15 @@ jobs:
id: locate-python
run: echo "python-path=$(which python)" >> "$GITHUB_OUTPUT"
- - name: Import GPG key
- env:
- GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
- GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- run: |
- echo "$GPG_PRIVATE_KEY" | gpg --batch --import
- gpg --list-secret-keys --keyid-format LONG
-
- name: Set version from release tag
- if: github.event_name == 'release'
- run: |
- VERSION="${{ github.ref_name }}"
- # Remove 'v' prefix if present
- VERSION="${VERSION#v}"
- mvn versions:set -DnewVersion="$VERSION"
-
- - name: Set version from workflow input
- if: github.event_name == 'workflow_dispatch' && inputs.release-version != ''
- run: |
- mvn versions:set -DnewVersion="${{ inputs.release-version }}"
-
- - name: Create settings.xml for Maven Central
- run: |
- mkdir -p ~/.m2
- cat > ~/.m2/settings.xml << 'EOF'
-
-
-
- central
- ${env.CENTRAL_USERNAME}
- ${env.CENTRAL_TOKEN}
-
-
-
- EOF
-
- - name: Run tests
- run: mvn clean verify
+ run: mvn versions:set -DnewVersion="${REF_NAME#v}"
env:
- ASDF_JAVA_TESTS_PYTHON_PATH: ${{ steps.locate-python.outputs.python-path }}
- GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
+ REF_NAME: ${{ github.ref_name }}
- - name: Deploy to Maven Central
- run: mvn deploy -DskipTests=true
+ - name: Publish
+ run: mvn --batch-mode deploy
env:
- CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
- CENTRAL_TOKEN: ${{ secrets.CENTRAL_TOKEN }}
+ ASDF_JAVA_TESTS_PYTHON_PATH: ${{ steps.locate-python.outputs.python-path }}
+ SERVER_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
+ SERVER_PASSWORD: ${{ secrets.CENTRAL_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
diff --git a/aggregate-report/pom.xml b/aggregate-report/pom.xml
index 158e144..22e973b 100644
--- a/aggregate-report/pom.xml
+++ b/aggregate-report/pom.xml
@@ -9,6 +9,8 @@
aggregate-report
+ aggregate-report
+
true
diff --git a/pom.xml b/pom.xml
index d0d0e08..92e1ba9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,7 +35,7 @@
UTF-8
8
- 0.26.0-1
+ dev
1.18.36
2.4
33.4.8-jre
@@ -188,12 +188,6 @@
sign
-
-
- --pinentry-mode
- loopback
-
-
@@ -237,6 +231,9 @@
maven-source-plugin
+
+ maven-gpg-plugin
+
org.sonatype.central
central-publishing-maven-plugin
@@ -256,13 +253,6 @@
-
-
- central
- https://central.sonatype.com/api/v1/publisher
-
-
-
roman-datamodels
aggregate-report