Skip to content

Commit ef1f9b7

Browse files
committed
added release workflow
1 parent e69a463 commit ef1f9b7

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ insert_final_newline = true
77
indent_style = space
88
indent_size = 4
99
tab_width = 4
10+
11+
[{*.yml,*.yaml}]
12+
indent_size = 2

.github/workflows/release.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
on:
2+
push:
3+
tags: ["*"]
4+
jobs:
5+
release:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Clone Repository
9+
uses: actions/checkout@v4
10+
- name: Setup Node
11+
uses: actions/setup-node@v4
12+
with:
13+
node-version: 18
14+
- name: Build Release
15+
run: npm run build
16+
- name: Grab Changelog from Commit Message Body
17+
run: |
18+
changelog=$(echo -e "$MESSAGE" | sed -n '/^$/,$p' | sed '1d')
19+
echo -e "$changelog"
20+
{
21+
echo 'CHANGELOG<<EOF'
22+
echo -e "$changelog"
23+
echo EOF
24+
} >> "$GITHUB_ENV"
25+
env:
26+
MESSAGE: ${{ github.event.head_commit.message }}
27+
- name: Upload Release
28+
uses: softprops/action-gh-release@v2
29+
with:
30+
body: ${{ env.CHANGELOG }}
31+
files: |
32+
main.js
33+
manifest.json
34+
styles.css

0 commit comments

Comments
 (0)