-
Notifications
You must be signed in to change notification settings - Fork 36
37 lines (35 loc) · 1015 Bytes
/
new_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
name: Create a new release from a tag
on:
push:
tags:
- v*
jobs:
create_release:
name: Create GitHub release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Get version
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
shell: bash
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: pip install commitizen czespressif>=1.3.1
- name: Generate changelog
run: |
cz changelog ${{ steps.get_version.outputs.VERSION }} --file-name changelog_body.md
cat changelog_body.md
- name: Create release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body_path: changelog_body.md
name: Version ${{ steps.get_version.outputs.VERSION }}
draft: true
prerelease: false