mirror of
https://gh.wpcy.net/https://github.com/fairpm/fair-plugin.git
synced 2026-04-21 03:53:29 +08:00
39 lines
1.2 KiB
YAML
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
|