fix(build): 💚 Add npm token to env in ci

This commit is contained in:
Jesse Wierzbinski 2024-05-16 23:22:01 -10:00
parent 8ce0e58c03
commit 3427c60ac1
No known key found for this signature in database

View file

@ -32,6 +32,8 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: NPM Deploy environment: NPM Deploy
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -45,6 +47,9 @@ jobs:
- name: Create bunfig.toml with NPM token (GitHub Secrets) - name: Create bunfig.toml with NPM token (GitHub Secrets)
run: echo -e "[install]\nregistry = { url = \"https://registry.npmjs.org/\", token = \"${{ secrets.NPM_TOKEN }}\" }" > bunfig.toml run: echo -e "[install]\nregistry = { url = \"https://registry.npmjs.org/\", token = \"${{ secrets.NPM_TOKEN }}\" }" > bunfig.toml
- name: Create .npmrc
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
- name: Install dependencies - name: Install dependencies
run: bun install --frozen-lockfile run: bun install --frozen-lockfile