-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (46 loc) · 1.32 KB
/
release.yaml
File metadata and controls
66 lines (46 loc) · 1.32 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
57
58
59
60
61
62
63
64
65
66
---
name: 'Release'
on:
push:
tags:
- '*'
# env:
# # ACTIONS_RUNNER_DEBUG: "true"
# # ACTIONS_STEP_DEBUG: "true"
# GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
jobs:
create:
name: 'Create'
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Trace
shell: bash
run: |
export
- name: Install Commitizen
shell: bash
run: |
pip install \
commitizen==3.28.0
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
ref: ${{ github.ref_name }}
- name: Create Incremental Changelog
shell: bash
run: |
export PREV_GIT_TAG="$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)";
export CURR_GIT_TAG="${{ github.ref_name }}";
cz changelog --dry-run --merge-prerelease --unreleased-version "$PREV_GIT_TAG" "$CURR_GIT_TAG" > changelog-release.md;
- name: Create Draft GH Release
uses: softprops/action-gh-release@v2
with:
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
body_path: changelog-release.md
make_latest: true
prerelease: false
draft: true