Skip to content

ci: GitHub Actions CI and npm trusted publishing (OIDC) - #5

Merged
Yukaii merged 1 commit into
masterfrom
ci/github-actions-oidc
Nov 20, 2026
Merged

Yukaii merged 1 commit into
masterfrom
ci/github-actions-oidc

Conversation

@Yukaii

@Yukaii Yukaii commented Nov 20, 2026

Copy link
Copy Markdown
Member

Summary

Replaces the inherited Travis config with GitHub Actions, following the setup in hackmdio/markdown-it.

Workflow Trigger What it does
ci.yml push to master, PRs npm ci, lint + test, build dist/ on Node 20 / 22 / 24
publish.yml GitHub Release published, or manual dispatch npm trusted publishing (OIDC) with provenance in the npm environment. Checks that the tag matches package.json and that the version isn't already published. Pre-release versions go to the next dist-tag. Has a dry-run input.
bump-version.yml manual dispatch on master bumps the version, runs tests, rebuilds dist/, commits chore: release X [skip ci], tags vX, creates the GitHub Release, dispatches publish.yml. Has a dry-run input.

Other changes:

  • package.json repository now points at hackmdio/markdown-it-deflist. npm provenance rejects a publish whose repository URL doesn't match the publishing repo, and it still pointed at upstream.
  • Removed .travis.yml. Replaced the Travis and Coveralls badges with the Actions badge and the @hackmd/markdown-it-deflist npm 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

  • Created the npm environment on this repo
  • Add a trusted publisher for @hackmd/markdown-it-deflist on npmjs.com: repo hackmdio/markdown-it-deflist, workflow publish.yml, environment npm. From the CLI (npm ≥ 11.15, logged in with 2FA):
    npm trust github @hackmd/markdown-it-deflist --repo hackmdio/markdown-it-deflist --file publish.yml --env npm --allow-publish

Test plan

  • CI passes on this PR
  • After merge, run Bump version and release with dry-run: true, then for real (patch → 2.2.3) to ship the DEV-3315 fix

🤖 Generated with Claude Code

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>
@Yukaii
Yukaii merged commit 8d65cf7 into master Nov 20, 2026
3 checks passed
@Yukaii
Yukaii deleted the ci/github-actions-oidc branch November 20, 2026 07: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