Release #35
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: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Release version" | |
required: true | |
next: | |
description: "Next version" | |
required: false | |
branch: | |
description: "The branch to use when releasing" | |
required: true | |
default: "master" | |
type: string | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.inputs.branch }} | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
cache: maven | |
- name: Set release version | |
env: | |
RELEASE_VERSION: ${{ github.event.inputs.version }} | |
run: | | |
mvn -B versions:set versions:commit -DnewVersion=$RELEASE_VERSION -Pprepare-release | |
git config --global user.email "project.openubl.preview.bot@gmail.com" | |
git config --global user.name "Project-Openubl Bot" | |
git commit --signoff --allow-empty -a -m "🏁 Releasing version $RELEASE_VERSION" | |
git push origin HEAD:${{ github.event.inputs.branch }} | |
- name: Prepare files | |
run: mvn -Ppublication -DskipTests | |
- name: JReleaser | |
uses: jreleaser/release-action@v2 | |
env: | |
JRELEASER_GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
JRELEASER_PROJECT_VERSION: ${{ github.event.inputs.version }} | |
JRELEASER_PRERELEASE_PATTERN: .*(?:Alpha|alpha|Beta|beta)[0-9] | |
JRELEASER_ZULIP_API_KEY: ${{ secrets.JRELEASER_ZULIP_API_KEY }} | |
JRELEASER_SLACK_TOKEN: ${{ secrets.JRELEASER_SLACK_TOKEN }} | |
JRELEASER_SLACK_WEBHOOK: ${{ secrets.JRELEASER_SLACK_WEBHOOK }} | |
JRELEASER_ARTICLE_GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }} | |
JRELEASER_NEXUS2_MAVEN_CENTRAL_USERNAME: ${{ secrets.NEXUS_USERNAME }} | |
JRELEASER_NEXUS2_MAVEN_CENTRAL_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | |
- name: Set next version | |
env: | |
NEXT_VERSION: ${{ github.event.inputs.next }} | |
run: | | |
mvn -B versions:set versions:commit -DnewVersion=$NEXT_VERSION -Pprepare-release | |
git config --global user.email "project.openubl.preview.bot@gmail.com" | |
git config --global user.name "Project-Openubl Bot" | |
git commit --signoff -a -m "⬆️ Next version $NEXT_VERSION" | |
git push origin HEAD:${{ github.event.inputs.branch }} |