Release #24
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: | |
branch: | |
description: "The ProtoStream branch to checkout when cutting the release." | |
required: true | |
default: "main" | |
version: | |
description: "Release version" | |
required: true | |
nextVersion: | |
description: "Next version" | |
required: true | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.branch }} | |
ssh-key: ${{ secrets.INFINISPAN_RELEASE_PRIVATE_KEY }} | |
- name: Set release version | |
run: | | |
mvn -B versions:set -DnewVersion=${{ github.event.inputs.version }} -DprocessAllModules=true | |
mvn -B versions:set-property -Dproperty=version.infinispan -DnewVersion=${{ github.event.inputs.version }} | |
- name: Set up Java for publishing to OSSRH | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
gpg-private-key: ${{ secrets.INFINISPAN_MAVEN_GPG_ARMORED }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
- name: Publish to OSSRH | |
run: mvn -B clean deploy -Pcommunity-release -DskipTests | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.INFINISPAN_MAVEN_GPG_PASSPHRASE }} | |
- name: Configure Git User | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "Infinispan" | |
- name: Tag Release | |
run: | | |
sed -e "s/[0-9]\+\.[0-9]\+\.[0-9]\+\.Final/${{ github.even.inputs.version }}/g" README.md | |
git commit -a -m "Releasing ${{ github.event.inputs.version }}" | |
git tag ${{ github.event.inputs.version }} | |
- name: Next Version | |
run: | | |
mvn -B versions:set -DnewVersion=${{ github.event.inputs.nextVersion }} -DprocessAllModules=true | |
mvn -B versions:set-property -Dproperty=version.infinispan -DnewVersion=${{ github.event.inputs.nextVersion }} | |
git commit -a -m "Next version ${{ github.event.inputs.nextVersion }}" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.event.inputs.branch }} | |
tags: true | |
ssh: true | |
- name: Create Release | |
run: gh release create ${{ github.event.inputs.version }} --generate-notes | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |