Merge branch 'release/next' #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow is used to release new versions of the library. | |
name: Release Workflow | |
on: | |
push: | |
branches: | |
- 'master' | |
# Never trigger a release build from a pull request. | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '8' | |
distribution: 'adopt' | |
cache: 'maven' | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
gpg-private-key: ${{ secrets.GPG_KEY }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
- name: Maven package and publish | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
run: mvn deploy -Prelease | |
- name: Maven build bundle | |
run: mvn clean package -Pbundle | |
- name: Get release version from POM file | |
run: echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV | |
- name: Create GitHub release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "target/cassandra-jdbc-wrapper-${{ env.RELEASE_VERSION }}-bundle.jar" | |
name: "${{ env.RELEASE_VERSION }}" | |
tag: "v${{ env.RELEASE_VERSION }}" | |
body: 'See changes [here](https://github.com/ing-bank/cassandra-jdbc-wrapper/blob/master/CHANGELOG.md#ver---yyyy-MM-dd).' | |
draft: true | |
token: ${{ secrets.GITHUB_TOKEN }} |