Repository navigation
ci: GitHub Actions CI and npm trusted publishing (OIDC) - #5
Merged
Merged
Conversation
Replace the inherited Travis config with GitHub Actions, following the setup in hackmdio/markdown-it. - ci.yml: lint, test and build on Node 20/22/24 for pushes to master and PRs - publish.yml: publish to npm via trusted publishing (no npm token), with provenance, from a release or manual dispatch in the `npm` environment - bump-version.yml: manual release workflow that bumps the version, rebuilds dist/, tags, creates the GitHub Release and dispatches publish.yml - point package.json repository at the fork; provenance requires it to match the publishing repo - swap Travis/Coveralls badges for the Actions and @hackmd npm badges Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the inherited Travis config with GitHub Actions, following the setup in hackmdio/markdown-it.
ci.ymlmaster, PRsnpm ci, lint + test, builddist/on Node 20 / 22 / 24publish.ymlnpmenvironment. Checks that the tag matchespackage.jsonand that the version isn't already published. Pre-release versions go to thenextdist-tag. Has a dry-run input.bump-version.ymlmasterdist/, commitschore: release X [skip ci], tagsvX, creates the GitHub Release, dispatchespublish.yml. Has a dry-run input.Other changes:
package.jsonrepositorynow points athackmdio/markdown-it-deflist. npm provenance rejects a publish whose repository URL doesn't match the publishing repo, and it still pointed at upstream..travis.yml. Replaced the Travis and Coveralls badges with the Actions badge and the@hackmd/markdown-it-deflistnpm badge.Fork release tags are prefixed with
v(v2.2.3), so they won't collide with the upstream tags already in the repo (3.0.0,4.0.0, …).Setup
npmenvironment on this repo@hackmd/markdown-it-defliston npmjs.com: repohackmdio/markdown-it-deflist, workflowpublish.yml, environmentnpm. From the CLI (npm ≥ 11.15, logged in with 2FA):Test plan
dry-run: true, then for real (patch → 2.2.3) to ship the DEV-3315 fix🤖 Generated with Claude Code