Skip to content

Commit

Permalink
publish action added
Browse files Browse the repository at this point in the history
  • Loading branch information
krutoo committed May 2, 2022
1 parent 6c9d159 commit d1c6143
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish NPM package

on:
release:
types: [created]

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 14
registry-url: https://registry.npmjs.org/

- name: Install dependencies
run: |
npm ci
npm i -g npm@7 --registry=https://registry.npmjs.org
- name: Build package
run: |
npm --no-git-tag-version version ${GITHUB_REF#refs/*/}
npm set-script prepare ""
npm run build
- name: Publish build
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,5 @@
"lint-staged": "^12.4.1",
"prettier": "^2.6.2",
"typescript": "^4.6.4"
},
"lint-staged": {
"*.{js,css,md}": "prettier --write"
}
}

0 comments on commit d1c6143

Please sign in to comment.