Skip to content

Commit 3eebb4e

Browse files
committed
fix: publish workflow
1 parent f644c95 commit 3eebb4e

File tree

3 files changed

+8
-24
lines changed

3 files changed

+8
-24
lines changed

.github/workflows/npm-publish.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,14 @@ on:
88
types: [created]
99

1010
jobs:
11-
build:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v3
15-
- uses: actions/setup-node@v3
16-
with:
17-
node-version: 16
18-
- run: npm ci
19-
2011
publish-npm:
21-
needs: build
2212
runs-on: ubuntu-latest
2313
steps:
2414
- uses: actions/checkout@v3
15+
# Setup .npmrc file to publish to npm registry
2516
- uses: actions/setup-node@v3
2617
with:
27-
node-version: 16
18+
node-version: "latest"
2819
registry-url: https://registry.npmjs.org/
2920
- run: npm ci
3021
- run: npm publish

.github/workflows/npm-push.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,16 @@ jobs:
1616
uses: 8BitJonny/[email protected]
1717
id: get-pr
1818

19-
build:
20-
runs-on: ubuntu-latest
21-
needs: [check-pr-labels]
22-
if: contains(needs.check-pr-labels.outputs.labels, 'release')
23-
steps:
24-
- uses: actions/checkout@v3
25-
- uses: actions/setup-node@v3
26-
with:
27-
node-version: 16
28-
- run: npm ci
29-
3019
publish-npm:
3120
runs-on: ubuntu-latest
32-
needs: [build, check-pr-labels]
21+
needs: [check-pr-labels]
3322
if: contains(needs.check-pr-labels.outputs.labels, 'release')
3423
steps:
3524
- uses: actions/checkout@v3
25+
# Setup .npmrc file to publish to npm registry
3626
- uses: actions/setup-node@v3
3727
with:
38-
node-version: 16
28+
node-version: "latest"
3929
registry-url: https://registry.npmjs.org/
4030
- run: npm ci
4131
- run: npm publish

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
2+
registry=https://registry.npmjs.org/
3+
always-auth=true

0 commit comments

Comments
 (0)