Skip to content

Commit

Permalink
Add publish to npm workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sebamarynissen committed Jan 31, 2024
1 parent 5f7a012 commit 9bc27b6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Node.js package

on:
release:
types: [created]

jobs:
publish-npm:
name: Publish to npm
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
cache: npm
- run: npm version ${TAG_NAME} --git-tag-version=false
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- run: npm whoami; npm --ignore-scripts publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@whisthub/agenda",
"version": "6.3.0",
"version": "0.0.0",
"description": "Light weight job scheduler for Node.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -35,7 +35,7 @@
},
"repository": {
"type": "git",
"url": "git://github.com/hokify/agenda"
"url": "git://github.com/whisthub/agenda"
},
"keywords": [
"job",
Expand Down

0 comments on commit 9bc27b6

Please sign in to comment.