Repository navigation
ci: publish npm releases directly instead of via Speakeasy - #1248
Draft
LukasParke wants to merge 2 commits into
Draft
LukasParke wants to merge 2 commits into
LukasParke wants to merge 2 commits into
Conversation
Replace speakeasy-api/sdk-generation-action's sdk-publish.yaml reusable workflow with an in-repo job that reads releaseVersion from gen.lock, publishes (skipping versions already released), and creates the v<version> GitHub release. Generation still uses Speakeasy. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
LukasParke
force-pushed
the
chore/first-party-publish
branch
from
October 22, 2026 23:07
62a9c4f to
b9a435d
Compare
This branch has not been deployed
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
speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15with a workflow in this repo that publishes@openrouter/sdkto npm and creates the GitHub release itself.When
.speakeasy/gen.lockchanges onmain, the job:releaseVersionfromgen.lockand checks it matchespackage.json.pnpm install --frozen-lockfile --ignore-scripts, thennpm publishon Node 24.prepublishOnlyruns the build, and provenance comes frompublishConfig. Prerelease versions are published under the prerelease dist-tag, as before.v<version>GitHub release, unless it already exists.The workflow keeps
name: Publish, sodispatch-agent-bump.yamlanddispatch-monorepo-sdk-bump.yamlstill fire when it succeeds.Side fix
Speakeasy's job checks out its own repo into
_speakeasy/, inside this package directory. As a result, the published@openrouter/sdk@1.5.2contains_speakeasy/.github/action-inputs-config.jsonand_speakeasy/.github/action-security-config.json. Those files are no longer published.What changes compared with Speakeasy's publish workflow
name:(openrouter-web'ssdk-publish-health.yamllooks this file up by name), triggers, thev<version>tag on the merge commit, the<lang> - v<version> - <UTC timestamp>release title, and release notes built fromgen.lock'sreleaseNotes.gen.lock'sreleaseVersiondoesn't match the package manifest. It no longer runs Speakeasy's Docker action, and the publish job doesn't needSPEAKEASY_API_KEY.Publishing Completedmarker Speakeasy appended to release notes, and thepublishedtag Speakeasy added in its registry for the source and code samples. Themainregistry tag is still applied bytagging.yaml. If any Speakeasy docs or code-sample setup depends onpublished, that needs a separatespeakeasy tagstep.Generation (
sdk_generation*.yaml) and registry tagging (tagging.yaml) still usespeakeasy-api/sdk-generation-action. This PR only changes publishing.Testing
actionlintpasses.gen.lock(1.5.2), and checked thatnpm viewdetects an existing version.pnpm install --frozen-lockfile --ignore-scripts && npm publish --dry-runbuilds 2,623 files, 5.8 MB unpacked. That equals the published 1.5.2 tarball minus the two_speakeasy/files.workflow_dispatch, which should skip both steps because 1.5.2 is already published.Follow-up (optional)
id-token: writeis granted, so npm trusted publishing can be turned on by configuring this repo and workflow as a trusted publisher on npmjs.com. After that,NPM_TOKENcan be removed.🤖 Generated with Claude Code