Skip to content

Commit ff29a24

Browse files
committed
RV [OPT] -> added logic to generate .npmrc
1 parent bbe24c5 commit ff29a24

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@ on:
77
jobs:
88
build:
99
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
packages: write
1013
steps:
1114
- uses: actions/checkout@v3
12-
- uses: actions/setup-node@v3
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v3
1318
with:
1419
node-version: '20.x'
1520
registry-url: 'https://npm.pkg.github.com'
@@ -21,6 +26,11 @@ jobs:
2126
- name: Build
2227
run: npm run build
2328

29+
- name: Create .npmrc file
30+
run: |
31+
echo "@th3hero:registry=https://npm.pkg.github.com/" >> .npmrc
32+
echo "//npm.pkg.github.com/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
33+
2434
- name: Publish to GitHub Packages
2535
run: npm publish
2636
env:

0 commit comments

Comments
 (0)