Skip to content
This repository was archived by the owner on Apr 22, 2025. It is now read-only.

Commit b715911

Browse files
Update release workflow
Change to match release-2.2 release workflow. Signed-off-by: Mark S. Lewis <[email protected]>
1 parent c203167 commit b715911

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
set -eu -o pipefail
4+
5+
PUBLISH_PROFILE="${1:?}"
6+
7+
POM_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpression=project.version -q -DforceStdout)
8+
PUBLISH_VERSION="${POM_VERSION%%-*}"
9+
10+
mvn --batch-mode --no-transfer-progress versions:set -DnewVersion="${PUBLISH_VERSION}"
11+
mvn --batch-mode --no-transfer-progress --activate-profiles "release,${PUBLISH_PROFILE}" -DskipTests deploy

.github/workflows/release.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,10 @@ jobs:
2222
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
2323
gpg-passphrase: MAVEN_GPG_PASSPHRASE
2424
- name: Publish
25-
shell: bash
2625
env:
2726
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2827
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
29-
PUBLISH_PROFILE: github
30-
run: |
31-
POM_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpression=project.version -q -DforceStdout)
32-
PUBLISH_VERSION="${POM_VERSION%%-*}"
33-
mvn --batch-mode --no-transfer-progress versions:set -DnewVersion="${PUBLISH_VERSION}"
34-
mvn --batch-mode --no-transfer-progress --activate-profiles "release,${PUBLISH_PROFILE}" -DskipTests deploy
28+
run: ${{ github.workspace }}/.github/scripts/maven_publish_release.sh github
3529

3630
publish-ossrh:
3731
name: Publish Java artifact to Maven Central
@@ -49,14 +43,8 @@ jobs:
4943
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
5044
gpg-passphrase: MAVEN_GPG_PASSPHRASE
5145
- name: Publish
52-
shell: bash
5346
env:
5447
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
5548
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
5649
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
57-
PUBLISH_PROFILE: ossrh
58-
run: |
59-
POM_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpression=project.version -q -DforceStdout)
60-
PUBLISH_VERSION="${POM_VERSION%%-*}"
61-
mvn --batch-mode --no-transfer-progress versions:set -DnewVersion="${PUBLISH_VERSION}"
62-
mvn --batch-mode --no-transfer-progress --activate-profiles "release,${PUBLISH_PROFILE}" -DskipTests deploy
50+
run: ${{ github.workspace }}/.github/scripts/maven_publish_release.sh ossrh

0 commit comments

Comments
 (0)