refactor: use @socketsecurity/lib parseArgs #494
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 to npm registry | ||
| 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@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | ||
| - uses: SocketDev/socket-registry/.github/actions/setup@a912e5bd8ec469d2ee13abf592a6b2e5898c006c # main | ||
| with: | ||
| scope: '@socketsecurity' | ||
| - run: npm install -g npm@latest | ||
| - run: pnpm install | ||
| # Build and publish 'socket' package (default). | ||
| - name: Build socket package | ||
| run: INLINED_SOCKET_CLI_PUBLISHED_BUILD=1 pnpm run build:dist | ||
| - name: Publish socket package | ||
| run: cd dist && npm publish --provenance --access public --no-git-checks | ||
| continue-on-error: true | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| SOCKET_CLI_DEBUG: ${{ inputs.debug }} | ||
| # Build and publish '@socketsecurity/cli' package (legacy). | ||
| - name: Build @socketsecurity/cli package | ||
| run: INLINED_SOCKET_CLI_PUBLISHED_BUILD=1 INLINED_SOCKET_CLI_LEGACY_BUILD=1 pnpm run build:dist | ||
| env: | ||
| SOCKET_CLI_DEBUG: ${{ inputs.debug }} | ||
| - name: Publish @socketsecurity/cli package | ||
| run: cd dist && npm publish --provenance --access public --no-git-checks | ||
| continue-on-error: true | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| SOCKET_CLI_DEBUG: ${{ inputs.debug }} | ||
| # Build and publish '@socketsecurity/cli-with-sentry' package. | ||
| - name: Build @socketsecurity/cli-with-sentry package | ||
| run: INLINED_SOCKET_CLI_PUBLISHED_BUILD=1 INLINED_SOCKET_CLI_SENTRY_BUILD=1 pnpm run build:dist | ||
| env: | ||
| SOCKET_CLI_DEBUG: ${{ inputs.debug }} | ||
| <<<<<<< HEAD | ||
| - run: npm publish --provenance --access public --no-git-checks | ||
| ======= | ||
| - name: Publish @socketsecurity/cli-with-sentry package | ||
| run: cd dist && npm publish --provenance --access public --no-git-checks | ||
| >>>>>>> 41c75fb6 (Update actions) | ||
| continue-on-error: true | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| SOCKET_CLI_DEBUG: ${{ inputs.debug }} | ||