-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (54 loc) · 2.08 KB
/
hotfix-pull-request.yml
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
58
59
60
61
62
63
64
65
name: Create hotfix pull request
on:
workflow_dispatch:
inputs:
changelog-message:
type: string
description: The message to add to the changelog
required: true
jobs:
create-hotfix-pull-request:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: main
- name: Release drafter
uses: release-drafter/release-drafter@v6
id: release-drafter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update release draft
uses: actions/github-script@v7
with:
script: |
const { owner, repo } = context.repo;
await github.rest.repos.updateRelease({
owner,
repo,
release_id: "${{ steps.release-drafter.outputs.id }}",
draft: true,
body: "### 🐛 Bug Fixes\n ${{ inputs.changelog-message }}\n"
});
- name: Update CHANGELOG.md file
uses: stefanzweifel/changelog-updater-action@v1
with:
latest-version: ${{ steps.release-drafter.outputs.tag_name }}
release-notes: "### 🐛 Bug Fixes\n ${{ inputs.changelog-message }}\n"
- name: Update other files
run: |
./scripts/update-files-with-release-version.sh ${{ steps.release-drafter.outputs.tag_name }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
commit-message: 'chore: update version'
title: Release ${{ steps.release-drafter.outputs.tag_name }}
body: |
Update version to ${{ steps.release-drafter.outputs.tag_name }}
### Checklist of actions to be done before merging
- [ ] Review and update the CHANGELOG.md if needed
- [ ] Review and update the Github release draft if needed
- [ ] Review the files updated with the new version number in the commit named "chore: update version"
branch: hotfix/${{ steps.release-drafter.outputs.tag_name }}
base: main
labels: hotfix, release