Uh oh!
There was an error while loading. Please reload this page.
feat(#61): automate npm publish via tag-triggered Trusted Publishing - #62
Merged
Conversation
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
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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
.github/workflows/release.yml: onv*tag push, publishes@dynamicagency/throughline-opencodevia npm Trusted Publishing (OIDC) - no stored npm token, automatic provenance attestation, and a tag-vs-package.jsonversion guard so a mistagged release fails loudly instead of shipping the wrong version..opencode-plugin/package.json'srepositoryfield to the object form withdirectoryset (the package lives in a subdirectory; provenance resolves the source repo from this field).Replaces the manual
npm publishworkaround from v0.14.0's first publish (#59), where the account's WebAuthn-only 2FA couldn't satisfynpm publish's--otprequirement 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/userdynamic, repothroughline, workflow filenamerelease.yml, no environment, allowed actionnpm 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 YAMLcd .opencode-plugin && npm ci && npm pack --dry-run- tarball unchanged (dist/ only, no src/ or test files), confirming therepositoryedit didn't affect what shipsreleaseworkflow succeeds andnpm view @dynamicagency/throughline-opencode dist-tagsshows 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