Skip to content
This repository was archived by the owner on Jun 2, 2023. It is now read-only.

Commit 1108233

Browse files
committed
ci: add workflows
1 parent 5745fdd commit 1108233

File tree

2 files changed

+42
-4
lines changed

2 files changed

+42
-4
lines changed

.github/workflows/release.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Install pnpm
17+
uses: pnpm/action-setup@v2
18+
19+
- name: Set node
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: 16.x
23+
cache: pnpm
24+
registry-url: "https://registry.npmjs.org"
25+
26+
- run: npx changelogithub
27+
continue-on-error: true
28+
env:
29+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
30+
31+
- name: Install Dependencies
32+
run: pnpm i
33+
34+
- name: Publish to NPM
35+
run: pnpm publish --access public --no-git-checks
36+
env:
37+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
".": {
1919
"types": "./dist/index.d.ts",
2020
"require": "./dist/index.cjs",
21-
"import": "./dist/index.mjs"
21+
"import": "./dist/index.js"
2222
}
2323
},
24-
"main": "./dist/index.mjs",
25-
"module": "./dist/index.mjs",
24+
"main": "./dist/index.js",
25+
"module": "./dist/index.js",
2626
"types": "./dist/index.d.ts",
27+
"bin": "./dist/cli.js",
2728
"typesVersions": {
2829
"*": {
2930
"*": [
@@ -39,7 +40,7 @@
3940
"build": "tsup",
4041
"dev": "tsup --watch",
4142
"prepublishOnly": "pnpm build",
42-
"release": "bumpp && npm publish",
43+
"release": "bumpp",
4344
"start": "esno src/index.ts",
4445
"test": "vitest"
4546
},

0 commit comments

Comments
 (0)