Skip to content

Commit 4e3ab51

Browse files
committed
feat(devops): add automated release logic via github actions
1 parent 25df077 commit 4e3ab51

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

.github/workflows/release-notes.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Inspired by Elk.Zone - Release Action
2+
# https://github.com/elk-zone/elk/blob/main/.github/workflows/release.yml
3+
# This action creates a release with every new tag that is created.
4+
# It attaches release notes to the release which are based on the github commits / pull requests.
5+
name: Release Notes
6+
7+
permissions:
8+
contents: write
9+
10+
on:
11+
push:
12+
tags:
13+
- 'v*'
14+
15+
jobs:
16+
release:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Set node
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 18
27+
28+
- run: npx changelogithub
29+
env:
30+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"format": "xo",
2020
"format:fix": "xo --fix",
2121
"test": "xo && ava -v",
22-
"ava": "ava -v --watch"
22+
"ava": "ava -v --watch",
23+
"release": "bumpp -r && tsx scripts/release.ts"
2324
},
2425
"files": [
2526
"index.js"
@@ -43,8 +44,11 @@
4344
},
4445
"devDependencies": {
4546
"ava": "^4.1.0",
47+
"bumpp": "^10.1.0",
4648
"dotenv": "^16.0.0",
4749
"npm-check-updates": "^12.5.4",
50+
"simple-git": "^3.27.0",
51+
"tsx": "^4.19.3",
4852
"xo": "^0.48.0"
4953
}
5054
}

0 commit comments

Comments
 (0)