Skip to content

Commit 45db135

Browse files
0xLeifclaude
andauthored
Publish the npm packages to public npm (OIDC + provenance) (#47)
@corvidlabs/threemd and @corvidlabs/three-md-element now publish to the public npm registry instead of GitHub Packages, so installing needs no token: `npm install @corvidlabs/threemd`. publishConfig switches to {access: public}; the publish workflow authenticates via npm Trusted Publishers (OIDC) with provenance, and upgrades npm to >= 11.5.1 first (Node 20 ships npm 10, which signs provenance but cannot do OIDC). Claude-Session: https://claude.ai/code/session_01MN2bMXHgTgkcxnkjtYSjwR Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent fbbe83b commit 45db135

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/publish.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
name: publish
22

3-
# Publishes the two npm packages to the public npm registry on each GitHub release:
4-
# @corvidlabs/threemd (the parser) and @corvidlabs/three-md-element (the
5-
# canonical <three-md> web component, which bundles the parser at build time).
6-
# Authenticates via npm Trusted Publishers (OIDC) — no NPM_TOKEN secret needed.
3+
# Publishes the two npm packages to the public npm registry on each GitHub
4+
# release: @corvidlabs/threemd (the parser) and @corvidlabs/three-md-element
5+
# (the canonical <three-md> web component, which bundles the parser at build
6+
# time). Authenticates via npm Trusted Publishers (OIDC) with provenance, so no
7+
# NPM_TOKEN secret is needed. OIDC publishing requires npm >= 11.5.1, which is
8+
# newer than the npm that ships with Node 20, so each job upgrades npm first.
79

810
on:
911
release:
@@ -29,6 +31,8 @@ jobs:
2931
node-version: "20"
3032
registry-url: "https://registry.npmjs.org"
3133
scope: "@corvidlabs"
34+
- name: Upgrade npm for OIDC trusted publishing
35+
run: npm install -g npm@latest && npm --version
3236
- run: bun install --frozen-lockfile
3337
- name: Sync package version to the release tag
3438
if: github.event_name == 'release'
@@ -55,6 +59,8 @@ jobs:
5559
node-version: "20"
5660
registry-url: "https://registry.npmjs.org"
5761
scope: "@corvidlabs"
62+
- name: Upgrade npm for OIDC trusted publishing
63+
run: npm install -g npm@latest && npm --version
5864
# Installs typescript for the .d.ts build. The bundle imports the parser
5965
# from source (../../js/src), so it needs no other dependency.
6066
- run: bun install

0 commit comments

Comments
 (0)