Skip to content

Commit

Permalink
Add prepare release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mk868 committed Nov 5, 2024
1 parent 102452e commit cce3ab0
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
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 }}'

0 comments on commit cce3ab0

Please sign in to comment.