Skip to content

Commit 83d55ae

Browse files
committed
setup publish script
1 parent 1a25237 commit 83d55ae

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

.github/workflows/publish.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ jobs:
99
name: 🚀 Publish
1010
runs-on: ubuntu-latest
1111
steps:
12+
- uses: pnpm/action-setup@v2
13+
with:
14+
version: 8
15+
1216
- name: 📚 Checkout
1317
uses: actions/checkout@v3
1418

@@ -19,11 +23,9 @@ jobs:
1923
registry-url: https://registry.npmjs.org
2024

2125
- name: 🍳 Prepare
22-
run: |
23-
npm install
24-
npm run build
26+
run: pnpm install
2527

2628
- name: 🚚 Publish
27-
run: npm publish
29+
run: pnpm run publish
2830
env:
2931
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
"private": true,
55
"license": "MIT",
66
"scripts": {
7-
"lint": "turbo lint && prettier ./ --check --ignore-path=.prettierignore",
87
"dev": "turbo dev",
9-
"build": "pnpm lint && turbo build"
8+
"lint": "turbo lint && prettier ./ --check --ignore-path=.prettierignore",
9+
"build": "turbo lint && turbo build",
10+
"publish": "turbo lint && turbo build && turbo publish"
1011
},
1112
"devDependencies": {
1213
"prettier": "^3.0.3",

packages/commandkit/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "commandkit",
33
"version": "0.0.10",
4-
"private": true,
54
"license": "MIT",
65
"main": "./dist/index.js",
76
"module": "./dist/index.mjs",
@@ -16,7 +15,8 @@
1615
"scripts": {
1716
"lint": "tsc",
1817
"dev": "tsup --watch",
19-
"build": "tsup"
18+
"build": "tsup",
19+
"publish": "npm publish"
2020
},
2121
"repository": {
2222
"type": "git",

turbo.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"pipeline": {
44
"lint": {},
55
"build": {},
6+
"publish": {},
67
"dev": {
78
"cache": false,
89
"persistent": true

0 commit comments

Comments
 (0)