Skip to content

Release

Release #11

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
pushScmChanges:
description: 'Push changes to Git (e.g. tag and version increment)'
type: boolean
default: true
required: true
skipDeploy:
description: 'Skip Maven deploy'
type: boolean
default: false
required: true
permissions:
contents: write
packages: write
jobs:
publish:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
- name: Configure Git commit info
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Publish package
run: >-
mvn -B clean scm:tag deploy
-Dchangelist=
-DreleaseTarget=github
-Dmaven.deploy.skip=$SKIP_DEPLOY
-DpushChanges=$PUSH_CHANGES
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SKIP_DEPLOY: ${{ inputs.skipDeploy }}
PUSH_CHANGES: ${{ inputs.pushScmChanges }}
- name: Increment version
run: >-
mvn -B validate versions:set-property scm:checkin
-Dchangelist=
-Dproperty=revision
-DnewVersion='${next-revision}'
-Dmessage='Increment revision to ${next-revision}'
-DpushChanges=$PUSH_CHANGES
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUSH_CHANGES: ${{ inputs.pushScmChanges }}