-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (43 loc) · 1.26 KB
/
release-create.yaml
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
name: Create Releases
on:
push:
branches:
- main
jobs:
tests:
uses: ./.github/workflows/tests.yaml
secrets: inherit
# only run if the commit message begins with "bump:"
if: "startsWith(github.event.head_commit.message, 'bump:')"
bump_version:
runs-on: ubuntu-latest
# only run if the other jobs succeed
needs:
- tests
permissions:
contents: read
# only run if the commit message begins with "bump:"
if: "startsWith(github.event.head_commit.message, 'bump:')"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ssh-key: "${{ secrets.DEPLOY_KEY }}"
- id: cz
name: Create changelog and bump version
uses: commitizen-tools/[email protected]
with:
changelog: true
changelog_increment_filename: "changes.md"
git_redirect_stderr: true
push: false
- name: Push changelog updates
run: |
git push origin main --tags
- name: Create release
uses: softprops/[email protected]
with:
body_path: "changes.md"
tag_name: "${{ steps.cz.outputs.version }}"
- run: |
echo "Bumped to version ${{ steps.cz.outputs.version }}"