Skip to content

Commit

Permalink
ci: add 'release' github-actions workflow that is triggering when the…
Browse files Browse the repository at this point in the history
… new release is created
  • Loading branch information
shine1594 committed Nov 23, 2021
1 parent cf0bf14 commit ab2ac7d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: release

on:
release:
types: [created]

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm test
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"prepare": "husky install",
"prettier": "npx prettier --config .prettierrc --check .",
"prettier:fix": "npx prettier --config .prettierrc --write .",
"release": "npx np --no-tests --no-publish",
"test": "jest test/*.spec.ts test/**/*.spec.ts",
"webpack": "webpack"
},
Expand Down

0 comments on commit ab2ac7d

Please sign in to comment.