Skip to content

Commit 997c398

Browse files
committed
Update publish workflow
1 parent 9713f85 commit 997c398

File tree

3 files changed

+82
-892
lines changed

3 files changed

+82
-892
lines changed
Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
name: "CLI - Publish"
1+
name: "Global - Publish"
2+
3+
# Publishes all packages in the monorepo.
4+
# Packages should specify `private: true` in their `package.json` files, if they shouldn't be published.
5+
# This workflow just installs and runs `pnpm publish`. Each package should add build scripts and similar to its `prepack` script in its `package.json` file.
26

37
on:
48
push:
@@ -9,6 +13,7 @@ jobs:
913
publish:
1014
name: Publish
1115
runs-on: ubuntu-latest
16+
1217
steps:
1318
- name: "Checkout repo"
1419
uses: actions/checkout@v3
@@ -27,14 +32,5 @@ jobs:
2732
- name: "Install dependencies"
2833
run: pnpm install
2934

30-
- name: "Publish to npm"
31-
id: npmPublish
32-
uses: JS-DevTools/npm-publish@v1
33-
with:
34-
token: ${{ secrets.NPM_AUTH_TOKEN }}
35-
36-
- name: "Add version tag"
37-
if: steps.npmPublish.outputs.type != 'none'
38-
run: |
39-
git tag v${{ steps.npmPublish.outputs.version }}
40-
git push origin v${{ steps.npmPublish.outputs.version }}
35+
- name: "Publish packages"
36+
run: pnpm publish -r

packages/create-next-stack/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
},
4747
"types": "lib/index.d.ts",
4848
"scripts": {
49-
"prepack": "pnpm build && oclif-dev readme",
49+
"prepack": "pnpm build",
5050
"check-types": "tsc --noEmit",
5151
"build": "rimraf lib && tsc --build",
5252
"clean": "rimraf lib && pnpm run clean-tests-dir",
@@ -59,7 +59,6 @@
5959
"test:cns": "pnpm build && ts-node src/tests/e2e/test-live-cns.ts",
6060
"print:help": "pnpm build && ./bin/dev --help",
6161
"print:version": "pnpm build && ./bin/dev --help",
62-
"version": "oclif-dev readme && git add README.md",
6362
"lint": "eslint --ext=.ts --config=.eslintrc --ignore-path=../../.prettierignore ."
6463
},
6564
"dependencies": {
@@ -74,7 +73,6 @@
7473
"validate-npm-package-name": "^5.0.0"
7574
},
7675
"devDependencies": {
77-
"@oclif/dev-cli": "^1.26.10",
7876
"@types/inquirer": "^9.0.3",
7977
"@types/node": "^18.15.13",
8078
"@types/uuid": "^9.0.1",

0 commit comments

Comments
 (0)