Skip to content

Commit

Permalink
feat: add build script
Browse files Browse the repository at this point in the history
  • Loading branch information
lichin-lin committed Nov 10, 2021
1 parent 0dc4ee5 commit 6d27218
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ jobs:
node-version: 14.x
- run: yarn
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- run: yarn build

NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# we need to setup user email & name to be able to build the package: https://github.com/fregante/setup-git-user
- name: Setup User
uses: fregante/setup-git-user@v1

- name: Build Package
run: yarn build

- name: Publish Package
run: yarn publish
# https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages#authenticating-to-the-destination-repository
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"scripts": {
"test": "jest --config jest.config.js",
"clean": "rimraf lib dist",
"build": "yarn version --patch && tsc",
"build": "tsc",
"p": "yarn publish",
"peers": "install-peers"
},
Expand Down

0 comments on commit 6d27218

Please sign in to comment.