fair-plugin/.github/workflows/bump-version.yml
Ryan McCue 9709fde544
Fix header version bump (#207)
Signed-off-by: Ryan McCue <me@ryanmccue.info>
2025-07-31 20:31:39 +01:00

39 lines
1.2 KiB
YAML

name: Bump version for release
on:
workflow_dispatch:
inputs:
version:
description: 'New version being released (e.g. "1.0.0")'
required: true
type: string
jobs:
log-the-inputs:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Bump version
run: |
# Replace the "Version:" header in plugin.php
sed -i "s/^ \* Version: .*/ \* Version: ${{ inputs.version }}/" plugin.php
# Replace the VERSION const in plugin.php
sed -i "s/^const VERSION = '.*/const VERSION = '${{ inputs.version }}';/" plugin.php
echo "Bumped version to ${{ inputs.version }}"
env:
VERSION: ${{ inputs.version }}
- name: Create pull request
uses: peter-evans/create-pull-request@v7
with:
branch: bump-version
commit-message: "Bump version to ${{ inputs.version }}"
title: "[bump-version] Bump version to ${{ inputs.version }}"
body: "Bump version to ${{ inputs.version }}. Triggered by ${{ github.triggering_actor }}."
base: main
signoff: true
delete-branch: true