Skip to content

Commit 13af7f3

Browse files
committed
Update publish action
1 parent 573b42d commit 13af7f3

File tree

1 file changed

+9
-24
lines changed

1 file changed

+9
-24
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,42 +9,27 @@ permissions:
99
packages: write
1010

1111
jobs:
12-
build:
12+
publish:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout code
1616
uses: actions/checkout@v4
1717

18-
- name: Setup Node.js
18+
- name: Setup Node.js & registry
1919
uses: actions/setup-node@v4
2020
with:
2121
node-version: '18.x'
2222
registry-url: 'https://npm.pkg.github.com'
23-
scope: '@roll20'
2423

24+
- name: Authenticate to GitHub Packages
25+
run: |
26+
echo "//npm.pkg.github.com/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
27+
2528
- name: Install, build, & test
2629
run: |
2730
npm install --legacy-peer-deps
2831
npm run build
2932
npm test
30-
31-
publish:
32-
needs: build
33-
runs-on: ubuntu-latest
34-
permissions:
35-
packages: write
36-
contents: read
37-
steps:
38-
- uses: actions/checkout@v3
39-
- uses: actions/setup-node@v3
40-
with:
41-
node-version: 18
42-
registry-url: https://npm.pkg.github.com/
43-
- run: npm install -g npm
44-
- run: npm ci
45-
env:
46-
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
47-
- run: npm publish
48-
env:
49-
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
50-
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
33+
34+
- name: Publish to GitHub Packages
35+
run: npm publish

0 commit comments

Comments
 (0)