mirror of
https://ghproxy.net/https://github.com/fairpm/fair-plugin.git
synced 2025-09-03 15:07:44 +08:00
Add workflow to bump the version (#203)
Signed-off-by: Ryan McCue <me@ryanmccue.info>
This commit is contained in:
parent
0cbb4f223e
commit
2bd1363345
1 changed files with 39 additions and 0 deletions
39
.github/workflows/bump-version.yml
vendored
Normal file
39
.github/workflows/bump-version.yml
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue