-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (61 loc) · 1.58 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Create Release
on:
# only trigger this workflow manually
workflow_dispatch:
inputs:
increment:
description: "Set a field to increment."
required: false
default: ""
type: choice
options:
- ""
- MAJOR
- MINOR
- PATCH
prerelease:
description: "Set as a prerelease version."
required: false
default: ""
type: choice
options:
- ""
- alpha
- beta
- rc
jobs:
tests:
uses: ./.github/workflows/tests.yaml
secrets: inherit
bump_version:
runs-on: ubuntu-latest
# only run if the other jobs succeed
needs:
- tests
permissions:
contents: write
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
increment: ${{ inputs.increment }}
prerelease: ${{ inputs.prerelease }}
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: "v${{ steps.cz.outputs.version }}"
- run: |
echo "Bumped to version v${{ steps.cz.outputs.version }}"