Skip to content

Commit 4b5c895

Browse files
committed
Fix GitHub actions build.yml
1 parent 3b7b920 commit 4b5c895

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

.github/workflows/build.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
14+
15+
permissions:
16+
contents: read
17+
packages: read
1418

1519
steps:
1620
- name: Checkout code
@@ -20,14 +24,28 @@ jobs:
2024
uses: actions/setup-node@v4
2125
with:
2226
node-version: '23'
27+
registry-url: 'https://npm.pkg.github.com'
28+
scope: '@modl-gg'
2329

24-
- name: Install root dependencies
25-
run: npm ci
30+
- name: Configure npm for GitHub Packages
31+
run: |
32+
rm .npmrc
33+
echo "@modl-gg:registry=https://npm.pkg.github.com" >> .npmrc
34+
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
35+
env:
36+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2637

2738
- name: Install client dependencies
2839
run: |
2940
cd client
3041
npm ci
42+
env:
43+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
45+
- name: Install dependencies
46+
run: npm ci
47+
env:
48+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3149

3250
- name: Run build
33-
run: npm run build
51+
run: npm run build

0 commit comments

Comments
 (0)