Skip to content

Commit

Permalink
add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lenkan committed May 5, 2024
1 parent fddaff2 commit e57928b
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 234 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish NPM
on:
push:
tags:
- v*
branches:
- publish-npm
jobs:
publish:
name: Create npm package
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Publish package ${{ vars.NPM_PACKAGE_NAME }}
env:
NPM_PACKAGE_NAME: ${{ vars.NPM_PACKAGE_NAME }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: node publish.js
265 changes: 34 additions & 231 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"types": "./dist/index.d.ts",
"type": "module",
"files": [
"dist",
"src"
"dist"
],
"scripts": {
"start": "npm run build:esm -- --watch",
Expand All @@ -24,7 +23,7 @@
"test:integration": "jest examples/integration-scripts/ --runInBand --bail",
"lint": "npx eslint src test examples/integration-scripts",
"prepare": "npm run build",
"generate-docs": "node_modules/.bin/jsdoc --configure .jsdoc.json --verbose",
"generate-docs": "jsdoc --configure .jsdoc.json --verbose",
"pretty": "prettier --write .",
"pretty:check": "prettier --check ."
},
Expand All @@ -46,6 +45,7 @@
"jsdoc": "^4.0.2",
"minami": "^1.2.3",
"prettier": "^3.0.3",
"semver": "^7.6.0",
"ts-jest": "^29.1.1",
"ts-mockito": "^2.6.1",
"ts-node": "^10.9.1",
Expand Down
Loading

0 comments on commit e57928b

Please sign in to comment.