nodejs-npm-auto-release

Node.js NPM Auto Release

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "nodejs-npm-auto-release" with this command: npx skills add hhx465453939/claude_skill_pool/hhx465453939-claude-skill-pool-nodejs-npm-auto-release

Node.js NPM Auto Release

Overview

Provide a repeatable workflow to prepare, verify, and ship npm packages with a combined auto-version-and-publish GitHub Action, plus local checks before push.

Setup Checklist

  • Add release scripts in package.json

{ "scripts": { "release:patch": "npm version patch -m "chore(release): v%s"", "release:minor": "npm version minor -m "chore(release): v%s"", "release:major": "npm version major -m "chore(release): v%s"" } }

  • Add .npmignore to keep packages clean

Typical entries:

  • .github/

  • .claude/

  • docs/

  • tests/

  • .env

  • node_modules/

  • Add the combined workflow file

Create .github/workflows/auto-version-publish.yml with:

name: auto version and publish

on: push: branches: - main

permissions: contents: write id-token: write

jobs: release: if: ${{ !contains(github.event.head_commit.message, 'chore(release):') }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0

  - name: Setup Node.js
    uses: actions/setup-node@v4
    with:
      node-version: "18"
      registry-url: "https://registry.npmjs.org"

  - name: Install dependencies
    run: |
      npm ci

  - name: Typecheck
    run: |
      npm run typecheck

  - name: Test
    run: |
      npm test

  - name: Configure git
    run: |
      git config user.name "github-actions[bot]"
      git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

  - name: Bump patch version and tag
    run: |
      npm version patch -m "chore(release): v%s [skip ci]"

  - name: Push version bump and tag
    run: |
      git push origin HEAD:main --follow-tags

  - name: Publish
    env:
      NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
    run: |
      npm publish --access public
  • Set GitHub secret

Add NPM_TOKEN in repo Secrets with publish permission.

Release Workflow

  • Local checks

npm run typecheck npm test npm pack --dry-run

  • Commit and push

git add -A git commit -m "feat: update package" git push origin main

  • Verify release

  • Ensure auto version and publish workflow succeeds

  • Confirm new tag created

  • Confirm npm version:

npm view <package-name> version

Notes

  • Auto-release skips commits containing chore(release): to avoid loops.

  • If you need manual bump, use npm run release:patch then push tags.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

pubmed-linker

No summary provided by upstream source.

Repository SourceNeeds Review
General

debug-ui

No summary provided by upstream source.

Repository SourceNeeds Review
General

extract

No summary provided by upstream source.

Repository SourceNeeds Review
General

ralph

No summary provided by upstream source.

Repository SourceNeeds Review