Skip to content

Commit 3dc9808

Browse files
committed
WIP
1 parent b8145d3 commit 3dc9808

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

.github/workflows/gh-pages.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,28 @@ jobs:
2727
- name: ⚡ Run test
2828
run: npm test
2929

30+
publish:
31+
name: Publish
32+
runs-on: ubuntu-latest
33+
needs: [test]
34+
steps:
35+
- name: 🛑 Cancel Previous Runs
36+
uses: styfle/[email protected]
37+
38+
- name: ⬇️ Checkout repo
39+
uses: actions/checkout@v3
40+
41+
- name: ⎔ Setup node
42+
uses: actions/setup-node@v3
43+
with:
44+
node-version: 16
45+
46+
- name: 📥 Download deps
47+
uses: bahmutov/npm-install@v1
48+
49+
- name: 📰 Publish to NPM (dry run)
50+
run: npm run publish:abcd
51+
3052
deploy:
3153
runs-on: ubuntu-latest
3254
needs: [test]

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"scripts": {
66
"test": "npm run test --workspace=@ci-cd/test",
77
"deploy:pages": "npm run build:abcd && npm run deploy --workspace=@ci-cd/pages",
8-
"build:abcd": "npm run build --workspace=@ci-cd/abcd"
8+
"build:abcd": "npm run build --workspace=@ci-cd/abcd",
9+
"publish:abcd": "npm run publish:dryrun --workspace=@ci-cd/abcd"
910
},
1011
"repository": {
1112
"type": "git",

packages/ci-cd-abcd/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"description": "abcd module",
99
"scripts": {
1010
"watch": "parcel watch",
11-
"build": "parcel build"
11+
"build": "parcel build",
12+
"publish:dryrun": "npm publish --dry-run"
1213
},
1314
"repository": {
1415
"type": "git",

0 commit comments

Comments
 (0)