Skip to content

Commit

Permalink
ci: fix error npm
Browse files Browse the repository at this point in the history
  • Loading branch information
haloivanid committed Aug 10, 2023
1 parent a5722bc commit 0c669ab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Publish to NPM

permissions:
contents: write

on:
push:
branches:
Expand All @@ -20,10 +23,13 @@ jobs:
registry-url: 'https://registry.npmjs.org'
scope: '@haloivanid'

- name: Install dependencies
run: npm ci
- name: Install semantic-release
run: npm i -g semantic-release

- run: npm i -g semantic-release
- name: Set up Yarn
uses: borales/actions-yarn@v4
with:
cmd: install

- name: Build lib folder
run: ./build.sh
Expand All @@ -33,4 +39,5 @@ jobs:
cd lib
npx semantic-release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ mkdir ./lib
yarn build

cp ./package.lib.json ./lib/package.json
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/lib/.npmrc
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ./lib/.npmrc

0 comments on commit 0c669ab

Please sign in to comment.