Publish Packages to npm #328
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Packages to npm | |
on: | |
workflow_dispatch: | |
inputs: | |
debug: | |
description: 'Enable debug output' | |
required: false | |
default: '0' | |
type: string | |
options: | |
- '0' | |
- '1' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
registry-url: 'https://registry.npmjs.org' | |
cache: npm | |
scope: '@socketregistry' | |
- run: npm install -g npm@latest | |
- run: npm ci | |
- run: npm run package:npm:publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
SOCKET_CLI_DEBUG: ${{ inputs.debug }} | |
- run: npm run package:npm:access | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
SOCKET_CLI_DEBUG: ${{ inputs.debug }} |