Skip to content

Commit

Permalink
don't run mvn versions:set during release
Browse files Browse the repository at this point in the history
in order to keep the `project.build.outputTimestamp`
  • Loading branch information
overheadhunter committed Oct 5, 2023
1 parent d1b720b commit 218ce91
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/publish-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ jobs:
server-password: MAVEN_PASSWORD # env variable for token in deploy
gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Enforce project version ${{ github.event.inputs.tag }}
run: ./mvnw versions:set -B -DnewVersion=${{ github.event.inputs.tag }}
- name: Verify project version = ${{ github.event.release.tag_name }}
run: |
PROJECT_VERSION=$(./mvnw help:evaluate "-Dexpression=project.version" -q -DforceStdout)
test "$PROJECT_VERSION" = "${{ github.event.release.tag_name }}"
- name: Deploy
run: ./mvnw deploy -B -DskipTests -Psign,deploy-central --no-transfer-progress
env:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/publish-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ jobs:
cache: 'maven'
gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Enforce project version ${{ github.event.release.tag_name }}
run: ./mvnw versions:set -B -DnewVersion=${{ github.event.release.tag_name }}
- name: Verify project version = ${{ github.event.release.tag_name }}
run: |
PROJECT_VERSION=$(./mvnw help:evaluate "-Dexpression=project.version" -q -DforceStdout)
test "$PROJECT_VERSION" = "${{ github.event.release.tag_name }}"
- name: Deploy
run: ./mvnw deploy -B -DskipTests -Psign,deploy-github --no-transfer-progress
env:
Expand Down

0 comments on commit 218ce91

Please sign in to comment.