Skip to content

Commit 0709246

Browse files
committed
chore: setup ci release
1 parent ed0f530 commit 0709246

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,25 @@ name: Release
33
on:
44
push:
55
tags:
6-
- '*'
6+
- 'v*'
77

88
jobs:
99
release:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
- uses: actions/setup-node@v2
16+
with:
17+
node-version: '14'
18+
registry-url: https://registry.npmjs.org/
19+
- run: npm i -g pnpm @antfu/ni
20+
- run: nci
21+
- run: nr test --if-present
22+
- run: npm publish --access public
23+
env:
24+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
1325
- run: npx conventional-github-releaser -p angular
1426
env:
1527
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{secrets.GITHUB_TOKEN}}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"type": "git",
1212
"url": "https://github.com/antfu/vite-plugin-components"
1313
},
14+
"funding": "https://github.com/sponsors/antfu",
1415
"homepage": "https://github.com/antfu/vite-plugin-components",
1516
"bugs": "https://github.com/antfu/vite-plugin-components/issues",
1617
"files": [
@@ -22,7 +23,7 @@
2223
"example:build": "npm -C example run build",
2324
"build": "tsup src/index.ts --dts --format cjs,esm",
2425
"prepublishOnly": "npm run build",
25-
"release": "npx bumpp --commit --tag --push && npm publish"
26+
"release": "npx git-ensure -a && npx bumpp --commit --tag --push"
2627
},
2728
"dependencies": {
2829
"chokidar": "^3.5.1",

0 commit comments

Comments
 (0)