-
Notifications
You must be signed in to change notification settings - Fork 4
112 lines (103 loc) · 3.7 KB
/
release.yml
File metadata and controls
112 lines (103 loc) · 3.7 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Automatic Release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
# Automatic semantic version bump (major/minor/patch from commit messages)
- name: Bump version and push tag
id: bump_version
uses: phips28/gh-action-bump-version@v11.0.3
with:
tag-prefix: 'v'
tag-suffix: '-beta'
skip-commit: true
patch-wording: 'patch,fix,fixes,docs'
minor-wording: 'feat,feature,minor'
major-wording: 'breaking,breaking-change,major'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Generate changelog file from previous commits
- name: Generate changelog
uses: mikepenz/release-changelog-builder-action@v5
id: changelog
with:
mode: 'COMMIT'
configurationJson: |
{
"template": "#{{CHANGELOG}}",
"commit_template": "- [`#{{MERGE_SHA_SUBSTRING}}`](${{ github.server_url }}/${{ github.repository }}/commit/#{{MERGE_SHA}}): #{{TITLE}} (@#{{AUTHOR}})",
"custom_placeholders": [
{
"name": "MERGE_SHA_SUBSTRING",
"source": "MERGE_SHA",
"transformer": {
"pattern": "^(.{6})",
"method": "regexr",
"target": "$1"
}
}
],
"categories": [
{
"title": "## Improvements",
"labels": [
"feat",
"feature"
]
},
{
"title": "## Bug Fixes",
"labels": [
"fix",
"bug"
]
},
{
"title": "## Documentation",
"labels": [
"docs"
]
},
{
"title": "## Housekeeping",
"labels": []
}
],
"sort": {
"order": "ASC",
"on_property": "mergedAt"
},
"label_extractor": [
{
"pattern": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\\([\\w\\-\\.]+\\))?(!)?: ([\\w ])+([\\s\\S]*)",
"on_property": "title",
"target": "$1"
}
]
}
toTag: ${{ steps.bump_version.outputs.newTag }}
fromTag: ''
# Create automatic GitHub release
- name: Create GitHub Release
uses: ncipollo/release-action@v1.18.0
with:
token: '${{ secrets.GITHUB_TOKEN }}'
tag: ${{ steps.bump_version.outputs.newTag }}
prerelease: false
name: 'Release ${{ steps.bump_version.outputs.newTag }}'
body: |
${{ steps.changelog.outputs.changelog }}
---

## Come Hang Out
- Questions? Join us on [Discord](https://discord.gg/gPpvhNvc5R)
- Found a bug? Open an issue on [GitHub](https://github.com/steel-dev/cli/issues)