Skip to content

Commit

Permalink
Add npm release workflow (#336)
Browse files Browse the repository at this point in the history
* Add release workflow

* Move building to prepack and and add linting and testing to prepublish

* Fix package-lock.json
  • Loading branch information
Methuselah96 authored Aug 20, 2023
1 parent 160b604 commit ca250fb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release

on:
workflow_dispatch: ~
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: 'npm'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
12 changes: 0 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"bump": "gulp bump",
"test": "nyc mocha",
"watch": "nodemon --exec \"mocha\"",
"prepublishOnly": "npm run build && npm run build-dist",
"prepack": "npm run build && npm run build-dist",
"prepublishOnly": "npm run test && npm run lint",
"cover-report": "open coverage/lcov-report/index.html",
"cover-publish": "nyc mocha && codeclimate < coverage/lcov.info"
},
Expand Down

0 comments on commit ca250fb

Please sign in to comment.