Skip to content

ci: GitHub Action for publishing to npm - #344

Merged
atherdon merged 1 commit into
mainfrom
ci/npm-publish-action
Sep 12, 2026
Merged

atherdon merged 1 commit into
mainfrom
ci/npm-publish-action

Conversation

@atherdon

Copy link
Copy Markdown
Collaborator

What this adds

Replaces .github/workflows/npm-publish.yml with a single-job workflow that:

  1. Checks out the repo (actions/checkout@v7)
  2. Sets up Node 22 + npm registry (actions/setup-node@v7)
  3. Installs, typechecks, builds, and tests
  4. Previews the tarball (npm pack --dry-run)
  5. Publishes with npm publish --access public --provenance

Triggers

  • GitHub Release published (tag should match package.json version, e.g. v2.0.0)
  • workflow_dispatch — optional dry-run (pack only)

Secret required

Repository secret npm_token: an npm Access Token with publish rights.

Settings → Secrets and variables → Actions → New repository secret

How to publish 2.0.0

  1. Merge this PR
  2. Confirm package.json version is 2.0.0
  3. Create a GitHub Release tagged v2.0.0
  4. This workflow runs and publishes to https://www.npmjs.com/package/markdown-regex

@atherdon
atherdon merged commit 9c79b04 into main Sep 12, 2026
4 of 11 checks passed
@atherdon
atherdon deleted the ci/npm-publish-action branch September 13, 2026 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant