diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..f2d16f0 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,35 @@ +name: Publish Package to npm +on: + workflow_dispatch: + inputs: + tag: + description: "Package tag" + required: false + type: string + push: + branches: + - master + - "CU-86c1h04qk-npm-auth" +jobs: + publish: + permissions: + packages: write + pull-requests: write + contents: read + id-token: write + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "22.x" + registry-url: "https://npm.pkg.github.com" + scope: "@kittl" + - name: Install package dependencies + run: npm install --frozen-lockfile + + - name: Build package + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 606d177..2d010bd 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,18 @@ { - "name": "redlock", - "version": "v5.0.0-beta.2", + "name": "@kittl/redlock", + "version": "5.0.0-beta.3", "description": "A node.js redlock implementation for distributed redis locks", "license": "MIT", "author": { "name": "Mike Marcacci", "email": "mike.marcacci@gmail.com" }, - "repository": "https://github.com/mike-marcacci/node-redlock.git", - "homepage": "https://github.com/mike-marcacci/node-redlock#readme", - "bugs": "https://github.com/mike-marcacci/node-redlock/issues", + "repository": { + "type": "git", + "url": "git+https://github.com/kittl/node-redlock.git" + }, + "homepage": "https://github.com/kittl/node-redlock#readme", + "bugs": "https://github.com/kittl/node-redlock/issues", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", @@ -71,5 +74,8 @@ "dependencies": { "node-abort-controller": "^3.0.1" }, - "type": "module" + "type": "module", + "publishConfig": { + "registry": "https://npm.pkg.github.com" + } }