What the agent does
The agent starts in its own cloud sandbox with the repository cloned and reads how the extension is built before it writes a workflow. In a project like chibat/chrome-extension-typescript-starter (TypeScript, React 18, webpack 5, Jest 29, npm with a package-lock.json), webpack/webpack.common.js has four entries, popup, options, background and content_script, emits them to dist/js/, splits shared code into vendor.js for everything except the background service worker, and a CopyPlugin copies public/ up into dist/. So dist/ is the loadable extension: public/manifest.json (Manifest V3, version 1.0, an options_ui page, an action popup, a content script on <all_urls>, a background.service_worker at js/background.js and the storage permission) sits at its root beside popup.html, options.html and icon.png. package.json scripts are build (webpack --config webpack/webpack.prod.js), watch, clean (rimraf dist) and test (npx jest), and .gitignore excludes dist/.
Then it reads what CI already does so the release reuses it rather than duplicating it. .github/workflows/build.yml runs on pushes and pull requests to main, on a Node 20 and 22 matrix, with actions/checkout@v5, actions/setup-node@v4, npm ci, npm run build --if-present and npm test, and stops there: no artifact is uploaded, no zip is made, and nothing happens on a tag. The gap is between a green build and something a person can upload to the Chrome Web Store or attach to a release.
The change is one new file, .github/workflows/release.yml, with contents: write permission, triggered by tags matching v* and by workflow_dispatch. Its steps: check out, set up Node 22 from the existing matrix with npm caching keyed on the lockfile, npm ci, npm test, npm run build, a step that reads version from public/manifest.json and fails if it does not equal the tag without its v, a step that zips the contents of dist/ so manifest.json is at the archive root, as Chrome requires, into extension-<version>.zip, an upload-artifact step so the zip is downloadable from the run, and a step that creates a GitHub Release for the tag with the zip attached through the gh CLI and the workflow's GITHUB_TOKEN. An optional last step uploads to the Chrome Web Store through its API when four repository secrets for the extension id and OAuth client are present, and is skipped with a notice when they are not, so the workflow is green on day one and store publishing can be turned on by adding secrets.
A tag workflow cannot be run from a pull request, so the agent proves each piece in the sandbox instead: it runs npm ci, npm test and npm run build, runs the same zip command the workflow uses, lists the archive with unzip -l to confirm manifest.json is at the root and js/background.js, js/popup.js, js/options.js, js/content_script.js and js/vendor.js are inside, and runs the version-check script against the current 1.0 with a matching and a mismatching tag to see it pass and fail. It also adds a short release section to README.md with the three commands a maintainer runs: bump version in public/manifest.json, tag v<version>, push the tag.
Start it with one API call
POST https://api.phoenix.so/o/{org}/sessions with this body:
{
"agent": "claude",
"input": "Add a release workflow for this Chrome extension at .github/workflows/release.yml. Read package.json, the webpack configs, public/manifest.json, .gitignore and the existing workflow under .github/workflows first, and reuse the Node version, install and build steps CI already uses. The workflow runs on tags matching v* and on manual dispatch: install with the lockfile, run the tests, build, fail if the manifest version does not equal the tag, zip the built extension directory so manifest.json is at the archive root, upload the zip as a workflow artifact, and create a GitHub Release for the tag with the zip attached using the workflow token. Add an optional Chrome Web Store upload step that runs only when the store secrets are set and is skipped with a notice otherwise; name the secrets in the workflow and in a short README section that also explains the bump, tag and push steps. Do not change the existing build workflow. In the sandbox, run the install, tests and build, produce the zip the same way the workflow does, list its contents, and exercise the version check with a matching and a mismatching tag. Open a pull request describing each step and what was verified locally.",
"resources": [
{
"url": "https://github.com/your-org/your-app"
}
]
}- Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
- Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
- Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.
What comes back
What comes back is a pull request on its own branch with two files: .github/workflows/release.yml and a release section in README.md. The description walks through the workflow step by step, names the four store secrets and says the store step is skipped until they exist, and notes that the existing build.yml is untouched. It is clear that the release workflow has not run on a tag yet, because no tag exists on the branch.
The transcript carries what was verified: npm ci, npm test and npm run build with their output, the zip command and the unzip -l listing with manifest.json at the root and the five bundles under js/, and the version check passing against a matching tag and failing against a mismatched one. The existing build workflow runs on the pull request as it does on every pull request to main.
Before merging, a reviewer checks that the tag pattern and the version comparison match how the team numbers releases, that contents: write is the only permission granted, that the zip excludes source maps if the dev build is ever used, and, after merging, pushes a test tag to see the release appear with the zip attached.
Run it on every new extension repository
From your own server, start one run per extension repository that has a build workflow but no release workflow: POST /o/{org}/sessions with this prompt and the repository in resources, one call each. GET /o/{org}/github lists every repository the Rush GitHub App installation reaches, so a script can pick the ones with a manifest.json and no release.yml and start them in a loop. Each run gets its own sandbox and branch and opens its own pull request.
Set a webhook_url on the key and each run POSTs run.completed or run.failed with its session_url when the turn finishes, within about 30 seconds, so the pull request links collect on your side without polling. Once the pull request is merged, the workflow itself runs on every tag with no further run needed.
The use case this job follows, with its automation and trigger: Hand off a long task.
Why run it on Rush?
A release workflow is written once and fails at the worst moment, on tag day, usually because the zip has a top-level folder or the manifest version drifted. On Rush the agent builds the extension in its own sandbox, produces the zip with the exact command the workflow uses and reads its listing back, and exercises the version check both ways, so the first real tag runs steps that have already been seen to work.
The result is a pull request with its evidence attached: the build output, the archive listing and the version-check runs are in the transcript, and the description says plainly what could only be verified by a tag. Several extension repositories can get the same workflow at once, each in its own sandbox on its own branch, up to the key's max_concurrent limit.
Frequently asked questions
Will it publish to the Chrome Web Store automatically?
Only when the repository has the store secrets set: the extension id and the OAuth client id, client secret and refresh token for the Web Store API. Without them the step is skipped with a notice and the release still gets the zip, so a maintainer can upload it by hand.
Does it change the existing build workflow?
No. build.yml keeps running on pushes and pull requests as before. The release workflow is a separate file that only runs on v* tags and manual dispatch, and reuses the same install and build commands.
How is the zip laid out?
The contents of dist/ are zipped so manifest.json is at the root of the archive, with popup.html, options.html, icon.png and the js/ bundles beside it, which is what Chrome and the Web Store expect. The transcript shows the unzip -l listing.
What happens if I tag v1.1 but the manifest still says 1.0?
The workflow fails before it zips or publishes anything, with a message naming both versions. The agent runs that check in the sandbox with a mismatched tag to show it fails, and the README section tells maintainers to bump the manifest first.