Skip to content

Commit

Permalink
Added release drafter and auto publish configuration, Updated package…
Browse files Browse the repository at this point in the history
….json with the pre publish commands
  • Loading branch information
ishanjain28 committed Sep 3, 2021
1 parent 88b90d5 commit 892fd07
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
template: |
## What’s Changed
$CHANGES
17 changes: 17 additions & 0 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: draft-release

on:
push:
branches:
- 'master'

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

20 changes: 20 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: npm-publish

on:
release:
types: [released]

jobs:
npm-publish:
name: npm-publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}
access: public
check-version: true
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"types": "dist/esm/src/index.d.ts",
"sideEffects": false,
"scripts": {
"prepublishOnly": "npm i && npm run build",
"build": "rollup -c rollup.config.js",
"dev": "rollup -w -c rollup.config.js",
"lint": "prettier -c --parser typescript \"{src,__tests__,e2e}/**/*.[jt]s?(x)\"",
Expand Down

0 comments on commit 892fd07

Please sign in to comment.