GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — ci: separate release builds from signing and publishing by thdxr · Pull Request #59046 · anomalyco/opencode Conversation
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Package | bun run build |
bun run pack |
|---|---|---|
| 14 libraries: schema, codemode, theme, ai, util, protocol, client, plugin, plugin-browser, core, simulation, server, sdk, ui | dist/ (JS + types) |
dist/npm/<name>-<version>.tgz via the shared @opencode/script/pack |
cli |
packages/cli/dist/cli-<target>/ for all 12 targets, or OPENCODE_TARGET |
dist/npm/ (wrapper + 12 platform packages, plus cli-node when built) and dist/archives/opencode-<target>.tar.gz |
cli (Node SEA) |
bun run build:node → packages/cli/dist/node/cli-node-<target>/ |
included in pack above |
cli (Docker) |
— | bun run pack:docker → dist/docker/opencode-image.tar (OCI, amd64 + arm64) |
desktop |
out/ plus resources/ (icons, metainfo, bundled CLI) |
dist/desktop/: macOS .app tarball, Windows unpacked app/, Linux AppImage/deb/rpm; with OPENCODE_DESKTOP_APP, the NSIS installer around a signed app |
| repo root | — | bun run pack: every npm package at the build version |
The root bun run pack loops bun run pack over the packages. Every artifact gets its SHA256SUMS from one script, .github/release/write-checksums.sh, via the upload action.
plan ─► tag ─┬─► build-cli ─┬─► build-npm ─┬─► publish-attestations ───────────┐
│ │ (+ build-node)├─► sign-macos ────────────────────┤
│ │ └─► sign-windows ──────────────────┤
│ │ ▼
│ │ publish-npm ─► publish-cli ─► publish-homebrew
│ │ └──────► publish-aur
│ ├─► build-docker ───────────────────────────────────► publish-docker
│ └─► build-desktop (×6) ─┬─► sign-macos (apps) ──────────────────┐
│ └─► sign-windows (apps) │
│ └─► build-desktop-windows-installer (×2)
│ └─► sign-desktop-windows-installer
│ ▼
│ publish-desktop
│ publish-cli + publish-desktop ─► publish-github-release
│ sign-windows + installer ─► publish-winget
└─────────────────────────────────────────────────► publish-version-pr (versioned only)
Job names are plan, tag, then build-<target>, sign-<target> and publish-<target>. Artifact names are <stage>-<target>:
build-cli, build-node-<target>, build-npm, build-archives, build-docker, build-desktop-<target>, build-desktop-windows-installer-<target>;sign-macos, sign-windows, sign-desktop-windows-<arch>, sign-desktop-windows-installer;publish-winget.Targets use one scheme everywhere: darwin-arm64, windows-x64, linux-arm64-musl, …
| Channel | Trigger | Builds | Publishes |
|---|---|---|---|
dev |
push to dev |
CLI, Node CLI, npm | npm --tag dev, R2, update feed dev |
beta |
push to beta |
desktop | desktop to R2 + update feed beta |
latest |
dispatch on dev with bump/version |
CLI, npm, desktop, Docker | v* tag + release commit, npm latest, R2, latest feeds, Homebrew, AUR, GHCR, GitHub Release, WinGet manifests, version PR |
| Job | Environment | Secrets / tokens | Runs repo code? |
|---|---|---|---|
plan |
— | none (permissions: {}) |
no |
tag |
— | GITHUB_TOKEN contents: write |
no (git only, hooks off) |
build-* |
— | read-only GITHUB_TOKEN |
yes |
sign-macos |
release |
APPLE_CERTIFICATE, _PASSWORD, APPLE_API_KEY_PATH, APPLE_API_KEY, APPLE_API_ISSUER |
no |
sign-windows, sign-desktop-windows-installer |
release |
Azure OIDC + AZURE_* |
no |
publish-attestations |
— | id-token, attestations: write |
no |
publish-npm |
release |
npm OIDC | no |
publish-cli, publish-desktop |
release |
CLOUDFLARE_API_TOKEN, update-server OIDC |
no |
publish-docker |
release |
GITHUB_TOKEN packages: write |
no |
publish-homebrew |
release |
OPENCODE_APP_SECRET (token scoped to homebrew-tap), update-server OIDC |
no |
publish-aur |
release |
AUR_KEY, update-server OIDC |
no |
publish-github-release |
release |
GITHUB_TOKEN contents: write |
no |
publish-winget |
— | none | no |
publish-version-pr |
— | GITHUB_TOKEN contents / pull-requests: write |
no |
Rules:
SHA256SUMS and must hold exactly the listed files.sign-* must also match the manifest digest that its sign job reported in a job output, so an artifact replaced after that job finished is rejected.plan and the scripts' allowlists; each tarball's package.json is read with jq as data.evaled.publish.yml → release.yml (name: release).source → tag;attest → publish-attestations;release-pr → publish-version-pr;winget-manifests → publish-winget;package-desktop-windows → build-desktop-windows-installer;sign-desktop-windows-installer keeps its name;build-node-app-archive is folded into build-node;sign-cli-macos + sign-desktop-macos → sign-macos;sign-cli-windows + sign-desktop-windows → sign-windows.scripts/ → script/, the repo-wide convention (20 packages to 1);prepare.ts and prebuild.ts fold into script/build.ts;package, package:mac, package:win and package:linux scripts are replaced by pack;copy-bundles.ts, a Tauri leftover, is deleted;x86_64-apple-darwin …) become darwin-x64 …;OPENCODE_CLI_TARGET → OPENCODE_TARGET;OPENCODE_CLI_DIST is gone: build uses packages/cli/dist when it holds the target;OPENCODE_VERSION through extraMetadata instead of rewriting package.json.--target= → OPENCODE_TARGET, with the same linux-x64 values as desktop and Node; --app-archive= → OPENCODE_APP_ARCHIVE; build-node defaults to dist/node.script/build.ts (codegen) → script/generate.ts, and script/build-package.ts → script/build.ts, so build runs build.ts and generate runs generate.ts.@opencode/script/pack. Every tarball's package.json and file list is byte-identical to before, apart from the new pack script entry; I checked by packing all 14 with the old and new scripts and diffing.OPENCODE_VERSION, OPENCODE_CHANNEL, OPENCODE_TARGET, OPENCODE_RELEASE_NOTES, plus OPENCODE_NPM_TAG and OPENCODE_DRY_RUN in .github/release/.Run 40244223496 passed every job in the graph. The only skips are by design: attestations and the version PR don't run in a dry run. All other checks are green as well.
Real builds:
--prepackaged.Sign and publish jobs, without secrets:
codesign --verify --deep --strict passes, and the dmg/zip/.app.tar.gz are built from the signed apps;npm publish --dry-run;desktop*.yml feeds are rendered;skopeo inspects the image, and the GitHub Release assets are assembled.Not provable without secrets:
v* tag push and the immutable release publish.All of these fail closed.
Why the dry run uses a copy. It runs from a temporary copy, .github/workflows/release-dry-run.yml, which has the same jobs, only a pull_request trigger, and is to be deleted before merge. GitHub never starts runs for the path .github/workflows/release.yml in this repo. A minimal probe workflow at that path didn't trigger on push either, while the identical file named probe-x.yml did. release.yml was the original name of publish.yml until June 2025 (f0dbe40522), so GitHub most likely still holds a stale workflow record for that path. See settings item 1.
script/{publish,version,update-artifact,publish-winget}.ts, script/sign-windows.ps1, packages/cli/script/{publish-aur,publish-homebrew}.ts, packages/desktop/scripts/{publish,prepare,prebuild,copy-bundles}.ts, all 14 packages/*/script/publish.ts (now pack.ts on the shared helper), packages/ui/script/publish.ts, .github/workflows/{notify-discord,publish-vscode}.yml, .github/publish-python-sdk.yml, and the three entitlements plists, which moved to .github/release/entitlements/.
Also removed:
bun i -g opencode-ai, the Tauri leftovers, and the unused secret references;GH_TOKEN (App token) being passed into the build.release.yml must be able to run. Before merging, check under Actions → All workflows (signed in) for a disabled or stale "release" workflow at .github/workflows/release.yml and enable it, or confirm that a push to dev starts it right after merge. If it won't start, the fallback is to keep the filename publish.yml with name: release.@opencode/* package (14 libraries, @opencode/cli, 12 @opencode/cli-*, 6 @opencode/cli-node*), set workflow release.yml and environment release. Then require 2FA and disallow tokens.services/update now requires workflow_ref == anomalyco/opencode/.github/workflows/release.yml@<ref> and environment == release, and allows latest only from a workflow_dispatch on dev. Deploy it via production right after merging. It rejects publish.yml tokens, so if it ships earlier, dev builds can't register.repo:anomalyco/opencode:environment:release. If any trust is keyed on job_workflow_ref, point it at release.yml.APPLE_* secrets into the release environment, then rotate them.AZURE_*, CLOUDFLARE_API_TOKEN, OPENCODE_APP_SECRET and AUR_KEY into release.BRENDAN_GITHUB_TOKEN, PORTER_* and DISCORD_ISSUES_WEBHOOK_URL.OPENCODE_API_KEY if bot-docs-locale and v1 still need it.v* tag rulesets: add GitHub Actions as a bypass actor on both overlapping rulesets (or merge them), and remove opencode-agent from the bypass.publish-version-pr.opencode-agent App: it's now only used for homebrew-tap. Drop its secrets, organization_secrets and workflows write, and rotate its key.v1, and code-owner review on dev so changes to .github/ need ci-owners.release-dry-run.yml, then merge.services/update.dev push (npm dev, R2, dev feed) and a beta push (desktop signing, beta feed)../script/release.ts patch.dev is still built and signed with our identity, and ships to the channel it was built for..github/ is the boundary. Anyone who can merge to dev without code-owner review, and org admins, can change what runs in release.release, because publish-attestations and the dry run hold id-token outside it.skopeo, aws and gh come from the runner image.packages/console, the docs, the update feeds, and the Homebrew/AUR formulas use them:
opencode-desktop-linux-x86_64.AppImage, -amd64.deb, -aarch64.rpm;opencode2-node-*.prod vs latest) are untouched, as you asked.check-*, bot-*, triage-*) are untouched; you're handling them separately.tag sits outside the build/sign/publish pattern, as you named it: it creates the version commit and tag before anything builds.build, build:node, pack:docker) because the Bun binaries, the Node SEA and the image are separate artifacts.script/build.ts for tsc-only packages. ai, plugin, plugin-browser and ui build with tsc directly. The interface is bun run build, so I didn't add a wrapper file.desktop/script/bench-startup.ts and profile-by-source.ts moved as pure renames, so they still mention package:win and scripts/. Editing them would make lint:changed demand fixes for about 70 pre-existing lint errors. lint:changed now skips exact moves (-M100%).pack no longer runs typecheck:tsc (some old publish scripts did, ui also ran its tests). CI's check and check-test cover that.Added by the opencode bot (AI-generated).
Related: #56297
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I reviewed this by reading it; I couldn't run it. The release pipeline needs GitHub runners, the release environment, Apple/Azure signing, npm and R2. The update-server tests pass (17/17). The type-check scripts don't run in this environment.
The build/sign split, the manifest digest pinning and the package allowlist in publish-npm look solid. Three concerns, details inline:
dev now waits on the release environment. Before, only versioned releases and beta did. Each push's sign-cli and npm/CLI publish jobs hit that gate at different stages, and the update server now accepts tokens only from release. If that environment has required reviewers, one dev preview could need several separate approvals. The description doesn't mention this.latest for any workflow_dispatch on dev, including dispatches without a bump or version, so it doesn't fully match plan's rule.Public API: no package APIs change. Script.release is removed from the internal @opencode/script, and the update server's publish endpoint now requires the environment: release and event_name OIDC claims.
.github/workflows/publish.yml:654: On dev pushes (dry_run=false) this and the other sign/publish jobs now run in release. The base workflow said dev previews don't wait for approval, and the update server now accepts only environment: release tokens, so dev can't simply drop it. If release has required reviewers, each dev push stops at several gates reached at different times (sign-cli-macos/windows, then publish-npm, then publish-cli). Is that intended? If not, a separate environment for dev previews, accepted by the update server for the dev channel only, would keep latest behind approval without gating every push..github/workflows/publish.yml:164: The entry's date comes from date -u at run time. If a versioned release fails after the tag is pushed and is dispatched again on a later UTC day, the tree changes and the check below stops with "Tag already exists with different contents". So the advertised tag reuse only works within the same day, or when "Re-run failed jobs" keeps source's output. Taking the date from the existing tag's commit, or leaving it out of the tree check, would make retries reliable.Related: #56297
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (ref === "refs/heads/dev") return ["dev", "latest"] | ||
| if (ref === "refs/heads/beta") return ["beta"] | ||
| // Pushes to dev ship dev builds. Only a manual dispatch of a versioned release may ship to latest. | ||
| export function allowedChannels(claims: Pick<GitHubClaims, "ref" | "event_name">) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This allows latest for any workflow_dispatch on dev, including dispatches with no bump or version, which plan treats as the dev channel. The description says the server enforces the same rule as plan, but only plan checks for the versioned inputs. If the server should enforce it on its own, it needs something that identifies a versioned run, for example a separate environment for versioned releases.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The new commit only moves the logic in packages/ui/script/pack.ts into an exported pack() to satisfy lint. The output is the same: the UI package's exports are all plain strings, and nothing else imports the script. oxlint passes on it. The earlier point, that the update server accepts latest for unversioned dispatches, isn't addressed by this commit. Public API: unchanged by this commit.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The new commit fixes a real problem: the redirect created an empty SHA256SUMS before find ran, so each manifest listed itself with a stale hash, and sha256sum -c --strict in the sign/publish jobs would have failed. I reproduced the failure with the old command and checked that the new one passes both the checksum check and the file-set diff. The remaining manifest writers name their files explicitly or use sha256sum -- *, so they never had the problem. Public API: unchanged by this commit.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The new commit fixes a real problem. Every library tarball sets publishConfig: {"access": "public"}, so the earlier has("publishConfig") check would have made publish-npm reject all of them. I ran the new filter on every workspace package.json with a publishConfig: all pass. A publishConfig with another key such as registry is still rejected, and a malformed value makes jq fail, which stops the job before publishing. Public API: unchanged by this commit.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The new commit updates the desktop packaging test to match the config change that removed signing. It now checks that mac.sign, mac.notarize and win.signtoolOptions are unset, where it used to expect a sign function, which the earlier removal would have broken. bun test electron-builder.config.test.ts passes (7/7). Public API: unchanged by this commit.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…the release environment
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The refactor holds together. Sign and publish jobs now check out only .github/release/, at the workflow's own commit, and run those scripts and the two local download/upload actions. With /.github/ owned by @anomalyco/ci-owners, that keeps the boundary the description sets out. The checksum and digest checks behave as before, and publish-npm.sh still publishes only the signed macOS and Windows CLI packages.
I ran bun run pack in packages/client through the new shared @opencode/script/pack helper: the tarball's exports point at built .js/.d.ts files, and they are present. The imports mapping for core, util and plugin matches the old per-package scripts. The desktop config tests pass (9/9). No callers of the old --target/--app-archive flags or packages/desktop/scripts/ paths are left.
One description detail is out of date: the sign/publish jobs now use local composite actions from .github/release/.
Public API: unchanged by this commit. Only internal build and pack scripts change.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The new commit is fine. It sends the GH_TOKEN/GITHUB_TOKEN Bearer header on the Bun release lookup, the same way the asset downloads next to it already pick up the token. build-cli passes the read-only github.token, and builds without a token behave as before. Public API: unchanged by this commit.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The renames are consistent. Every script release.yml calls exists, artifact names and digest keys match the new job names, nothing still points at the old names, and the update server's workflow_ref and the attestation --signer-workflow both now say release.yml. The Docker build job gets the setup-bun it needs for bun run pack:docker. services/update tests pass (17/17).
One thing to handle outside the code before the first real run: npm trusted publishing and the deployed update server both key on the workflow filename (inline).
Public API: unchanged by these commits.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @@ -0,0 +1,678 @@ | |||
| name: release | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Renaming the workflow file affects two things outside the repo:
@opencode/* package (and the CLI platform packages) has to be switched from publish.yml to release.yml in npm, or the first npm publish here fails the OIDC exchange.workflow_ref. If it's deployed before this merges, the current publish.yml runs on dev stop registering; if after, the first release.yml run gets 403s. Its deploy needs to land together with the merge.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The new commit is fine for testing this PR. release-dry-run.yml differs from release.yml only in its name and triggers, and a pull_request event always maps to the dry-run pr channel, so it can't publish. release.yml no longer runs on pull requests. Remember to delete the copy before merging. Public API: unchanged by this commit.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # version on dev reaches latest. | ||
| # .github/release/ and this file are the security boundary for releases. | ||
|
|
||
| # TEMPORARY copy of release.yml for this PR's dry run: GitHub does not start runs for the release.yml path on |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
If GitHub won't start release.yml runs because that path once belonged to publish.yml, check the repo's Actions settings: if the old release.yml workflow is disabled or stale there, pushes to dev and release dispatches may not start it after merge either until it's re-enabled. Worth confirming before relying on it, along with deleting this file before merging.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
# Conflicts: # .github/workflows/publish.yml # packages/cli/script/build.ts # packages/desktop/electron-builder.config.ts # packages/desktop/electron.vite.config.ts # packages/desktop/script/beta-notes.test.ts # packages/desktop/script/beta-notes.ts # packages/desktop/script/beta-visual.ts # packages/desktop/script/upload.ts # packages/desktop/script/utils.ts # packages/desktop/scripts/publish.ts # script/sign-windows.ps1
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The merge from dev is resolved correctly. Signing stays out of the build in the desktop config and utilities, dev's beta-notes and i18n imports now use script/, and dev's new models-catalog job, catalog smoke checks and beta settings are in release.yml build jobs with no secrets. The desktop config and beta-notes tests pass (55/55).
One leftover from the merge: nix/desktop.nix still hands its CLI over through OPENCODE_CLI_DIST, which this PR no longer reads (inline).
Public API: unchanged by these commits.
nix/desktop.nix:98: script/build.ts no longer reads OPENCODE_CLI_DIST; it only bundles a CLI found in packages/cli/dist. The Nix build prepares its CLI here, so build.ts ignores it: with no OPENCODE_CHANNEL set it resolves to dev and tries to download the published dev CLI, which needs network access. Point this at packages/cli/dist (or have build.ts accept an explicit CLI directory again) so the Nix desktop bundles the Nix-built CLI.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
estou solicitando extorno da compra. por favor responda meus email, e me devolva meu dinheiro. seus servico esta suspenso. e pelo jeito muitas pessoas estao com o mesmo problema.! quero extornar a compra! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
estou solicitando extorno da compra. por favor responda meus email, e me devolva meu dinheiro. seus servico esta suspenso. e pelo jeito muitas pessoas estao com o mesmo problema.! quero extornar a compra! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.