-
Notifications
You must be signed in to change notification settings - Fork 4
57 lines (45 loc) · 1.79 KB
/
draft-new-release.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
name: 'Draft New Release'
on:
workflow_dispatch:
inputs:
version:
description: 'The version you want to release.'
required: true
jobs:
draft-new-release:
name: 'Draft a New Release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create release branch
run: git checkout -b release/${{ github.event.inputs.version }}
- name: Update Changelog
uses: thomaseizinger/[email protected]
with:
version: ${{ github.event.inputs.version }}
- name: Initialize mandatory git config
run: |
git config user.name "Github Actions"
git config user.email "[email protected]"
- name: Commit Changelog
id: make-commit
run: |
git add CHANGELOG.md
git commit --message "Prepare release ${{ github.event.inputs.version }}"
echo "::set-output name=commit::$(git rev-parse HEAD)"
- name: Push New Branch
run: git push origin release/${{ github.event.inputs.version }}
- name: Create Pull Request
uses: thomaseizinger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
head: release/${{ github.event.inputs.version }}
base: main
title: Release ${{ github.event.inputs.version }}
reviewers: ${{ github.actor }}
body: |
Hi @${{ github.actor }}!
This PR was created in response to a manual trigger of the release workflow here: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}.
I've updated the changelog file in this commit: ${{ steps.make-commit.outputs.commit }}.
Merging this PR will create a GitHub release with the new PK3.