Skip to content

Prepare Release

Prepare Release #1

name: 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 }}
mvn -B -ntp -f jgpio-it/pom.xml versions:set -DnewVersion=${{ github.event.inputs.version }}
mvn -B -ntp -f examples/pom.xml versions:set-property -Dproperty=jgpio.version -DnewVersion=${{ github.event.inputs.version }}
sed -i '/<version>/s/>.*</>${{ github.event.inputs.version }}</' README.md
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
commit-message: 'Release ${{ github.event.inputs.version }}'
branch: 'release-${{ github.event.inputs.version }}'