Skip to content

Commit

Permalink
Run tests only once during release
Browse files Browse the repository at this point in the history
  • Loading branch information
jabrah committed Oct 16, 2023
1 parent a18cc57 commit 0b69fc3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ jobs:
# =============================================================================
# Start the release
# =============================================================================
- name: Run tests
run: mvn -B -U -V -ntp verify

- name: Bump version to release
run: mvn -B -U -V -ntp versions:update-parent -DparentVersion=$RELEASE

Expand All @@ -103,10 +106,12 @@ jobs:
add: pom.xml **/pom.xml
message: "Update parent version to $RELEASE"

# Maven Release Plugin is currently configured to hook into the install phase, so tests would normally be run
# Since we ran tests at the start of this process, skip tests here to save some time
- name: Release main POM
run: |
mvn -B -U -V -ntp release:prepare -DreleaseVersion=$RELEASE -Dtag=$RELEASE -DdevelopmentVersion=$NEXT
mvn -B -U -V -ntp release:perform -P release
mvn -B -U -V -ntp release:prepare -DreleaseVersion=$RELEASE -Dtag=$RELEASE -DdevelopmentVersion=$NEXT -DskipTests -Darguments=-DskipTests
mvn -B -U -V -ntp release:perform -P release -DskipTests -Darguments=-DskipTests
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
Expand All @@ -123,7 +128,7 @@ jobs:
push: true

- name: Build and publish new dev version
run: mvn -B -U -V -ntp deploy -P release
run: mvn -B -U -V -ntp deploy -P release -DskipTests
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
Expand Down

0 comments on commit 0b69fc3

Please sign in to comment.