Prepare Release #2
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: Prepare Release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Release version' | |
required: true | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 23 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '23' | |
distribution: 'temurin' | |
cache: maven | |
- name: Set release version | |
run: | | |
mvn -B -ntp -f jgpio/pom.xml versions:set -DnewVersion=${{ github.event.inputs.version }} -DgenerateBackupPoms=false | |
mvn -B -ntp -f jgpio-it/pom.xml versions:set -DnewVersion=${{ github.event.inputs.version }} -DgenerateBackupPoms=false | |
mvn -B -ntp -f examples/pom.xml versions:set-property -Dproperty=jgpio.version -DnewVersion=${{ github.event.inputs.version }} -DgenerateBackupPoms=false | |
sed -i '/<version>/s/>.*</>${{ github.event.inputs.version }}</' README.md | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
title: 'Prepare release ${{ github.event.inputs.version }}' | |
body: 'Automated preparation of ${{ github.event.inputs.version }} release' | |
commit-message: 'Set version to ${{ github.event.inputs.version }}' | |
branch: 'release-${{ github.event.inputs.version }}' |