Skip to content

Commit

Permalink
Test build before deploying it
Browse files Browse the repository at this point in the history
  • Loading branch information
cowwoc committed May 23, 2024
1 parent de534d0 commit 50dce67
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/deploy_to_maven_central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,14 @@ jobs:
!~/.m2/repository/com/github/cowwoc/requirements
key: "${{ runner.OS }}-maven-${{ hashFiles('**/pom.xml') }}"

- name: Test build
run: >
./mvnw --batch-mode -V -e verify
# Avoid using exclamation mark on bash: https://stackoverflow.com/a/27177197/14731
- name: Deploy to Maven Central
run: >
./mvnw --batch-mode -V -e -pl '!benchmark,!benchmark/java,!benchmark/guava,!benchmark/assertj'
./mvnw --batch-mode -V -e -pl '!test,!benchmark,!benchmark/java,!benchmark/guava,!benchmark/assertj'
-Dstaging_repository_id=${{ needs.open-release.outputs.STAGING_REPOSITORY_ID }}
-Dstaging_host="${{ env.STAGING_HOST }}"
deploy
Expand Down

0 comments on commit 50dce67

Please sign in to comment.