This repository has been archived by the owner on Jan 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (60 loc) · 2.54 KB
/
prepare-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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
on:
workflow_dispatch:
inputs:
release-type:
description: 'Release type. See `npm-version` docs for more details.'
type: choice
required: true
options:
- major
- minor
- patch
- premajor
- preminor
- prepatch
- prerelease
default: patch
preid:
description: 'Pre-release identifier (only for pre-release builds). See `npm-version` docs for more details.'
required: false
name: '[autorelease] Prepare release PR'
jobs:
changelog:
name: Update changelog and create PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.RELEASEBOT_APP_ID }}
private_key: ${{ secrets.RELEASEBOT_PRIVATE_KEY }}
- name: Update changelog
id: update-changelog
uses: release-flow/keep-a-changelog-action/prepare-release@v1
with:
release-type: ${{ github.event.inputs.release-type }}
prerelease-identifier: ${{ github.event.inputs.preid }}
- name: Create Pull Request
id: create-release-pr
uses: peter-evans/create-pull-request@v4
with:
commit-message: 'chore: Update changelog for release ${{ steps.update-changelog.outputs.release-version }}'
committer: 'releasebot <[email protected]>'
branch: 'autorelease/${{ steps.update-changelog.outputs.release-version }}'
title: '[autorelease] Release ${{ steps.update-changelog.outputs.release-version }}'
# Be careful of newlines here. We need to use the literal block chomping style (|) so that the
# contents of the release notes don't get chomped. See https://yaml-multiline.info/
body: |
**This PR was created automatically by the releasebot**
**:warning: Approving this PR will trigger a workflow that generates a draft release. You need to publish this release when you are happy with it.**
The changes in this PR prepare for release ${{ steps.update-changelog.outputs.release-version }}. The release notes are:
---
${{ steps.update-changelog.outputs.release-notes }}
labels: autorelease
token: ${{ steps.generate-token.outputs.token }}
- name: Output summary
run: |
echo "::notice title=Release PR Prepared::A release PR has been created, please merge it to continue with the release process: ${{ steps.create-release-pr.outputs.pull-request-url }}"