Skip to content

Commit 4265ee5

Browse files
committed
fix: build before publish
1 parent 45d9223 commit 4265ee5

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ jobs:
1414
- run: |
1515
npm install -g json && json -I -f package.json -e '
1616
this.version = "${{ github.ref }}".replace("refs/tags/", "");
17+
this.main = "dist/src/index.js";
18+
this.types = "dist/src/index.d.ts";
1719
'
20+
- run: npm run build
1821
- run: npm publish
1922
env:
2023
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

.github/workflows/release_dev.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ jobs:
1515
- run: |
1616
npm install -g json && json -I -f package.json -e '
1717
this.version = "0.0.0-dev.'$(date -u +'%Y%m%d%H%M%S')'";
18+
this.main = "dist/src/index.js";
19+
this.types = "dist/src/index.d.ts";
1820
'
21+
- run: npm run build
1922
- run: npm publish --tag dev
2023
env:
2124
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,4 @@ typings/
6161
.next
6262

6363
package-lock.json
64+
dist

0 commit comments

Comments
 (0)