Skip to content

Commit

Permalink
Merge pull request #39 from Bandwidth/task/dynamic-publish-workflow
Browse files Browse the repository at this point in the history
DX-2148 Use the tag to dynamically release versions
  • Loading branch information
hamermike authored Aug 18, 2021
2 parents d417684 + 91b7903 commit ac71f52
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@ jobs:
if: ${{ !github.event.release.prerelease && github.event.release.target_commitish == 'main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'

- name: Build with Maven
run: mvn -B package --file pom.xml

- uses: actions/checkout@v2
- name: Set up Apache Maven Central
uses: actions/setup-java@v2
Expand All @@ -30,6 +20,12 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Get Maven project version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV

- name: Set Maven project version
run: mvn versions:set -DnewVersion=$RELEASE_VERSION

- name: Publish to Apache Maven Central
run: mvn deploy
env:
Expand Down

0 comments on commit ac71f52

Please sign in to comment.