Skip to content

Commit 5221c97

Browse files
committed
feat: add shared release workflow
1 parent 50c6132 commit 5221c97

File tree

3 files changed

+80
-0
lines changed

3 files changed

+80
-0
lines changed

.editorconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*{.yml,.yaml}]
15+
indent_style = space
16+
indent_size = 2
17+
18+
[*.json]
19+
indent_style = space
20+
indent_size = 4

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/.github export-ignore
2+
.editorconfig export-ignore
3+
.gitignore export-ignore

.github/workflows/create-release.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
3+
# https://github.com/google-github-actions/release-please-action#release-types-supported
4+
5+
on: # yamllint disable-line rule:truthy
6+
workflow_call:
7+
inputs:
8+
os:
9+
description: The operating system to run the workflow on
10+
required: true
11+
type: string
12+
default: ubuntu-latest
13+
branch:
14+
description: The branch to use when creating the release
15+
required: true
16+
type: string
17+
default: master
18+
package-name:
19+
description: The name of the package to release
20+
required: true
21+
type: string
22+
token:
23+
description: The GitHub token to use when creating the release
24+
required: true
25+
type: string
26+
27+
name: 📦 Create release
28+
29+
jobs:
30+
release:
31+
runs-on: ${{ inputs.os }}
32+
steps:
33+
- name: 🎉 Create release
34+
uses: google-github-actions/release-please-action@v3
35+
id: release
36+
with:
37+
token: ${{ inputs.token }}
38+
release-type: node
39+
package-name: ${{ inputs.package-name }}
40+
default-branch: ${{ inputs.branch }}
41+
changelog-types: |
42+
[
43+
{ "type": "feat", "section": "Features", "hidden": false },
44+
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
45+
{ "type": "perf", "section": "Performance Improvements", "hidden": false },
46+
{ "type": "docs", "section": "Documentation", "hidden": false },
47+
{ "type": "chore", "section": "Miscellaneous", "hidden": false },
48+
{ "type": "style", "section": "Styles", "hidden": true },
49+
{ "type": "revert", "section": "Reverts", "hidden": true },
50+
{ "type": "deps", "section": "Dependencies", "hidden": true },
51+
{ "type": "refactor", "section": "Code Refactoring", "hidden": true },
52+
{ "type": "test", "section": "Tests", "hidden": true },
53+
{ "type": "build", "section": "Build System", "hidden": true },
54+
{ "type": "ci", "section": "Continuous Integration", "hidden": true }
55+
]
56+
57+
...

0 commit comments

Comments
 (0)