Skip to content

Commit

Permalink
chore(workflows): add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhanasy committed Aug 9, 2022
1 parent 3b5ebe4 commit 37f1cf2
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ jobs:
- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1

- name: Lint
run: yarn lint

- name: Test
run: yarn test --ci --coverage --maxWorkers=2

Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: NPM Publish

on:
release:
types: [created]

jobs:
build:
name: Build and publish to NPM

runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Node 12
uses: actions/setup-node@v1
with:
node-version: "12.x"
registry-url: "https://registry.npmjs.org"

- name: Install deps
run: yarn install

- name: Test
run: yarn test --ci --coverage --maxWorkers=2

- name: Build
run: yarn build

- name: Publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit 37f1cf2

Please sign in to comment.