Added release drafter and auto publish configuration, Updated package.json with the pre publish commands

This commit is contained in:
ishanjain28 2021-09-03 18:08:05 +05:30
parent 88b90d53b4
commit 892fd079a0
4 changed files with 41 additions and 0 deletions

3
.github/release-drafter.yml vendored Normal file
View File

@ -0,0 +1,3 @@
template: |
## Whats Changed
$CHANGES

17
.github/workflows/draft-release.yml vendored Normal file
View File

@ -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
.github/workflows/npm-publish.yml vendored Normal file
View File

@ -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

View File

@ -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)\"",