Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
kwongpan committed Jun 5, 2024
1 parent 425c4b4 commit 9733797
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/code-validation.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Linter and build
on: [push]

env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

jobs:
squid-type:
runs-on: ubuntu-latest
Expand All @@ -8,6 +12,10 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: "18"
- run: yarn install
- run: yarn build
- run: yarn lint

- name: NPM auth, install and build
run: |
npm set //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN
yarn install --inmutable
yarn build
yarn lint
11 changes: 6 additions & 5 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- main

env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

jobs:
release:
name: Release Squid Types package
Expand All @@ -15,12 +18,10 @@ jobs:
with:
node-version: "18"

- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Install dependencies
- name: NPM auth, install and build
run: |
yarn install
npm set //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN
yarn install --inmutable
yarn build
- name: Publish to NPM
Expand Down

0 comments on commit 9733797

Please sign in to comment.