Publish: manual full release #98
Workflow file for this run
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
name: "Publish: manual full release" | |
on: | |
workflow_dispatch: | |
inputs: | |
releaseversion: | |
description: 'Release version' | |
required: true | |
nextversion: | |
description: 'Next dev version' | |
required: true | |
workflow_call: | |
inputs: | |
releaseversion: | |
description: 'Release version' | |
required: true | |
type: string | |
nextversion: | |
description: 'Next dev version' | |
required: true | |
type: string | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
env: | |
RELEASE: ${{ inputs.releaseversion }} | |
NEXT: ${{ inputs.nextversion }} | |
steps: | |
- name: Setup Java & Maven | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
cache: 'maven' | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
gpg-private-key: ${{ secrets.MAVEN_GPG_KEY }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
- name: Checkout latest code | |
uses: actions/checkout@v3 | |
- name: Config git user | |
run: | | |
git config user.name ${{ github.actor }} | |
git config user.email "${{ github.actor }}@users.noreply.github.com" | |
- name: Set the release version, commit the change, and tag it | |
run: | | |
mvn versions:set -B -ntp -DnewVersion=$RELEASE | |
git commit -am "Update version to $RELEASE" | |
git tag $RELEASE | |
- name: Release Java modules | |
uses: ./.github/actions/maven-release | |
- name: Set the next dev version and commit the change | |
run: | | |
mvn versions:set -B -ntp -DnewVersion=$NEXT | |
echo git commit -am "Update version to $NEXT" | |
- name: Release dev Java modules | |
working-directory: combined | |
run: | | |
echo mvn -B -V -ntp clean deploy -DskipTests -DskipITs | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | |
- name: Push the commits and tags | |
run: | | |
echo git push origin | |
echo git push origin --tags | |
- name: Create GitHub release | |
run: | | |
echo gh release create "$RELEASE" --generate-notes |