Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Refuse a tag that disagrees with the project version
run: |
tag="${GITHUB_REF_NAME#v}"
version="$(mvn --batch-mode --quiet -DforceStdout \
help:evaluate -Dexpression=project.version)"
if [ "$tag" != "$version" ]; then
echo "tag $GITHUB_REF_NAME does not match project.version $version" >&2
exit 1
fi

- name: Verify
run: mvn --batch-mode --no-transfer-progress verify

Expand Down
9 changes: 9 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,15 @@
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<!-- Without this a deployment stops in the portal as
"validated" and waits for someone to press Publish. A
release here is already gated on a green suite and on the
tag matching the version, so the extra click adds a place
to forget rather than a decision. -->
<autoPublish>true</autoPublish>
<!-- Fail the build if the portal rejects the deployment,
instead of reporting success and leaving it stuck. -->
<waitUntil>published</waitUntil>
</configuration>
</plugin>
</plugins>
Expand Down
Loading