Skip to content

Commit

Permalink
For tagged builds update the project version before publishing JARs
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcwarren committed Feb 16, 2021
1 parent f6b08ce commit 8ae6dcd
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,18 @@ jobs:
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}

- name: Publish JARs
run: mvn -B -DskipTests=true -P ci,docs deploy --file pom.xml
run: |
#!/bin/bash
set -eux
if [[ "${GITHUB_REF}" == *"tags"* ]]; then
TAG="${GITHUB_REF#refs/tags/}"
mvn org.codehaus.mojo:versions-maven-plugin:2.1:set -DnewVersion="${TAG}"
fi
mvn -B -DskipTests=true -P ci,docs deploy --file pom.xml
env:
GITHUB_USERNAME: ${{ secrets.CI_USERNAME }}
GITHUB_PASSWORD: ${{ secrets.CI_PASSWORD }}
Expand Down

0 comments on commit 8ae6dcd

Please sign in to comment.