-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (47 loc) · 1.44 KB
/
prepare_release.yml
File metadata and controls
57 lines (47 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Prepare Release
on:
workflow_dispatch:
inputs:
version:
description: 'The version to prepare the release for'
required: true
type: choice
options:
- major
- minor
- patch
default: patch
jobs:
prepare-release:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Batch changes
uses: miniscruff/changie-action@v2
with:
version: latest
args: batch ${{ github.event.inputs.version }}
- name: Merge changes
uses: miniscruff/changie-action@v2
with:
version: latest
args: merge
- name: Get the latest version
id: latest
uses: miniscruff/changie-action@v2
with:
version: latest
args: latest
- name: Set version
run: |
sed -i 's/^const PluginVersion = ".*"/const PluginVersion = "'"${{ steps.latest.outputs.output }}"'"/' internal/core/config.go
echo "✅ Updated PluginVersion to $new_version"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v8
with:
title: Release ${{ steps.latest.outputs.output }}
branch: release/${{ steps.latest.outputs.output }}
commit-message: Release ${{ steps.latest.outputs.output }}
labels: skip-fragment-check