-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (49 loc) · 2.02 KB
/
draft_release.yml
File metadata and controls
56 lines (49 loc) · 2.02 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
---
name: "Draft new release"
on: # yamllint disable-line rule:truthy
workflow_dispatch:
inputs:
tag:
description: 'Version to release (format: vXX.YY.ZZ)'
required: true
jobs:
new-release:
name: "Draft a new release"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'
- name: Update CHANGELOG
run: |
python3 -m pip install mdformat-gfm 'git+https://github.com/Takishima/keepachangelog@v1.0.1'
python3 -m keepachangelog release "${{ github.event.inputs.tag }}"
python3 -m mdformat CHANGELOG.md
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v7
id: make-commit
with:
branch: release/${{ github.event.inputs.tag }}
create_branch: true
file_pattern: 'CHANGELOG.md'
commit_message: Preparing release ${{ github.event.inputs.tag }}
commit_author: github-actions[bot] <noreply@github.com>
# yamllint disable rule:line-length
- name: Create pull request
uses: thomaseizinger/create-pull-request@1.4.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
head: release/${{ github.event.inputs.tag }}
base: main
title: Release version ${{ github.event.inputs.tag }}
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 and bumped the versions in the manifest files in this commit: ${{ steps.make-commit.outputs.commit_hash }}.
Merging this PR will create a GitHub release and upload any assets that are created as part of the release build.