Skip to content

Commit 7c4fcba

Browse files
committed
ci(release): add release workflow and bump tool
- Add GitHub workflow for automated releases on tag push - Include bumpp package for version bumping - Add release script to package.json
1 parent 7848825 commit 7c4fcba

File tree

3 files changed

+166
-1
lines changed

3 files changed

+166
-1
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
permissions:
11+
id-token: write
12+
contents: write
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Install pnpm
20+
uses: pnpm/action-setup@v4
21+
22+
- name: Set node
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: lts/*
26+
cache: pnpm
27+
registry-url: 'https://registry.npmjs.org'
28+
29+
- run: pnpm dlx changelogithub
30+
env:
31+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
32+
33+
- name: Install
34+
run: pnpm install
35+
36+
- name: Build
37+
run: pnpm build
38+
39+
# Ensure npm 11.5.1 or later is installed
40+
- name: Update NPM
41+
run: npm install -g npm@latest
42+
43+
- name: Publish to NPM
44+
run: pnpm -r publish --access public --no-git-checks

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"lint:fix": "eslint --fix",
1616
"test": "vitest run",
1717
"dev": "vitest",
18-
"dev:prepare": "node --run typegen && node --run stub"
18+
"dev:prepare": "node --run typegen && node --run stub",
19+
"release": "bumpp"
1920
},
2021
"exports": {
2122
".": {
@@ -79,6 +80,7 @@
7980
},
8081
"devDependencies": {
8182
"@types/node": "^22.18.3",
83+
"bumpp": "^10.2.3",
8284
"eslint": "^9.35.0",
8385
"eslint-config-vuetify": "file:",
8486
"tsx": "^4.20.5",

pnpm-lock.yaml

Lines changed: 119 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)