Skip to content

Commit

Permalink
chore: add npm release CI workflow (#10)
Browse files Browse the repository at this point in the history
* chore: add npm release CI workflow

* chore: remove test from prepublish
  • Loading branch information
marvinhagemeister authored Feb 23, 2024
1 parent e299ca4 commit f86f7c4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Publish Package to npmjs
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"test": "mocha -r ts-node/register --extensions ts,tsx --timeout 30000 --watch-files src,test 'test/**/*.test.ts'",
"cli": "ts-node src/bin.ts",
"build": "rimraf dist dist-esm && tsc && tsc -p tsconfig.esm.json",
"prepublishOnly": "tsc && npm test"
"prepublishOnly": "tsc"
},
"keywords": [
"install",
Expand Down

0 comments on commit f86f7c4

Please sign in to comment.