Skip to content

Commit

Permalink
add npm publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
shaozi committed Sep 14, 2024
1 parent 9a95e9a commit b414ddd
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 13 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
24 changes: 13 additions & 11 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ldap-authentication",
"version": "3.2.2",
"version": "3.2.3",
"description": "A simple async nodejs library for LDAP user authentication",
"main": "index.js",
"types": "./index.d.ts",
Expand Down Expand Up @@ -39,6 +39,6 @@
"ldapjs": "^3.0.7"
},
"devDependencies": {
"jasmine": "^5.1.0"
"jasmine": "^5.3.0"
}
}

0 comments on commit b414ddd

Please sign in to comment.