Skip to content

Commit 269f8cf

Browse files
authored
chore: update publish workflow
chore: update publish workflow
2 parents d0ca9f9 + fe84390 commit 269f8cf

File tree

4 files changed

+36
-75
lines changed

4 files changed

+36
-75
lines changed

.github/workflows/npm-publish.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Node.js Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v5
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 20
15+
- run: npm ci
16+
- run: npm test
17+
18+
publish-gpr:
19+
needs: build
20+
runs-on: ubuntu-latest
21+
permissions:
22+
packages: write
23+
contents: read
24+
steps:
25+
- uses: actions/checkout@v5
26+
- uses: actions/setup-node@v4
27+
with:
28+
node-version: 20
29+
registry-url: https://npm.pkg.github.com/
30+
- run: npm ci
31+
- run: npm publish
32+
env:
33+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

.npmrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
strict-peer-dependencies=false
22
engine-strict = true
3-
engine=node >=18.20.4
3+
engine=node >=18.20.4
4+
@fecommunity:registry=https://npm.pkg.github.com

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"reactpress-client": "./client/bin/reactpress-client.js"
1919
},
2020
"publishConfig": {
21-
"access": "public"
21+
"@fecommunity:registry": "https://npm.pkg.github.com"
2222
},
2323
"files": [
2424
"bin/**/*",

0 commit comments

Comments
 (0)