-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (48 loc) · 1.66 KB
/
deploy.yml
File metadata and controls
53 lines (48 loc) · 1.66 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
name: Deploy
on:
workflow_dispatch:
inputs:
version-tag:
description: Version tag
required: true
default: 'v0.1.0'
dry-run: # print the changelog without creating a PR.
description: Dry run
type: boolean
default: false
exclude-types:
description: Commit types to exclude from the changelog
required: false
default: build,docs,style,other
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get CHANGELOG
id: changelog
uses: kiyoon/changelog-action@v2
with:
new-version-tag-for-future: ${{ github.event.inputs.version-tag }}
tag-prefix: v
exclude-types: ${{ github.event.inputs.exclude-types }}
write-to-file: true
changelog-file-path: docs/CHANGELOG.md
- name: Display CHANGELOG
env:
CHANGES_BODY: ${{ steps.changelog.outputs.changes }}
run: |
echo "${CHANGES_BODY}"
echo "${CHANGES_BODY}" > "$GITHUB_STEP_SUMMARY"
- name: Create PR
if: ${{ github.event.inputs.dry-run == 'false' }}
uses: peter-evans/create-pull-request@v7
with:
commit-message: 'chore: release ${{ github.event.inputs.version-tag }}'
title: 'chore: release ${{ github.event.inputs.version-tag }}'
body: |
:robot: The changelog was automatically generated by [kiyoon/changelog-action](https://github.com/kiyoon/changelog-action). :robot:
branch: chore/release-${{ github.event.inputs.version-tag }}
labels: |
release