Skip to content

feat(#61): automate npm publish via tag-triggered Trusted Publishing - #62

Merged
jsirish merged 1 commit into
mainfrom
feat/npm-trusted-publishing
Aug 26, 2026
Merged

feat(#61): automate npm publish via tag-triggered Trusted Publishing#62
jsirish merged 1 commit into
mainfrom
feat/npm-trusted-publishing

Conversation

@jsirish

Copy link
Copy Markdown
Member

Summary

  • Adds .github/workflows/release.yml: on v* tag push, publishes @dynamicagency/throughline-opencode via npm Trusted Publishing (OIDC) - no stored npm token, automatic provenance attestation, and a tag-vs-package.json version guard so a mistagged release fails loudly instead of shipping the wrong version.
  • Switches .opencode-plugin/package.json's repository field to the object form with directory set (the package lives in a subdirectory; provenance resolves the source repo from this field).
  • README/CHANGELOG note the new tag-triggered publish path.

Replaces the manual npm publish workaround from v0.14.0's first publish (#59), where the account's WebAuthn-only 2FA couldn't satisfy npm publish's --otp requirement and required a short-lived Granular Access Token per release.

Before this workflow can succeed on a real tag, a Trusted Publisher must be configured on npmjs.com for @dynamicagency/throughline-opencode: org/user dynamic, repo throughline, workflow filename release.yml, no environment, allowed action npm publish. This is separate, one-time, manual browser setup - not part of this PR.

Test plan

  • /local-ci --strict - all checks pass (shellcheck, manifest validation, plugin version agreement, hook tests, opencode plugin build+test)
  • python3 -c "import yaml; yaml.safe_load(open('.github/workflows/release.yml'))" - valid YAML
  • cd .opencode-plugin && npm ci && npm pack --dry-run - tarball unchanged (dist/ only, no src/ or test files), confirming the repository edit didn't affect what ships
  • Configure Trusted Publisher on npmjs.com (manual, post-merge)
  • First real tag push after merge - confirm the release workflow succeeds and npm view @dynamicagency/throughline-opencode dist-tags shows the new version with a provenance badge. This is genuinely untested until that happens.

Closes#61

🤖 Generated with Claude Code

https://claude.ai/code/session_011s2om7vED2R8ZohhkN11qe

Add .github/workflows/release.yml, triggered on v* tag push, that publishes
@dynamicagency/throughline-opencode using npm Trusted Publishing (OIDC) -
no stored npm token, automatic provenance attestation. Includes a
tag-vs-package.json version guard so a mistagged release fails loudly
instead of publishing the wrong version (npm versions are immutable).
Switches .opencode-plugin/package.json's repository field to the object
form with directory set, since the package lives in a subdirectory and
provenance resolves the source repo from this field.
The v0.14.0 publish (#59) required a short-lived Granular Access Token
workaround because the account's WebAuthn-only 2FA can't satisfy npm
publish's --otp requirement. Trusted Publishing removes that workaround
for every release going forward.
Requires a one-time Trusted Publisher configured on npmjs.com for
@dynamicagency/throughline-opencode (repo dynamic/throughline, workflow
filename release.yml) before the first tag push will succeed.
Closes#61
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011s2om7vED2R8ZohhkN11qe
@jsirish
jsirish merged commit 5362e8d into mainAug 26, 2026
2 checks passed
@jsirish
jsirish deleted the feat/npm-trusted-publishing branch August 26, 2026 03:58
Sign up for freeto 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.

Automate npm publish via tag-triggered GitHub Actions using Trusted Publishing (OIDC)

1 participant

@jsirish