-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-changelog.yaml
More file actions
40 lines (39 loc) · 1.15 KB
/
build-changelog.yaml
File metadata and controls
40 lines (39 loc) · 1.15 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
# Build the changelog for a given version with a manual trigger
on:
workflow_dispatch:
inputs:
version:
description: "Version to build changelog for"
required: true
type: string
# You can also trigger this workflow from another workflow
workflow_call:
inputs:
version:
description: "Version to build changelog for"
required: true
type: string
jobs:
build-changelog:
runs-on: ubuntu-latest
outputs:
changelog: ${{ steps.build-changelog.outputs.changelog }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: commitizen-tools/setup-cz@main
- name: Build changelog
env:
GIVEN_VERSION: ${{ github.event.inputs.version }}
run: |
cz changelog --dry-run "${GIVEN_VERSION}" > .changelog.md
- name: Display changelog
run: |
cat .changelog.md
# You can send this file wherever you want:
# - For a Github release
# - Update a website
# - Send it to a Slack channel
# - Send it to a compliance tool