-
Notifications
You must be signed in to change notification settings - Fork 36
Replace fragile local release script with GitHub Actions workflow trigger #116
Copy link
Copy link
Closed
Description
Problem
The current release process relies on scripts/publish.sh, a local shell script that performs ~15 steps locally (npm auth, gh auth, lint, build, E2E tests, version bump, changelog update, git commit/tag/push, npm publish, GitHub release creation). This is fragile because:
- Partial failure state: If any step after
npm publishfails, the package is published to npm but the GitHub release is missing — exactly what happened with v0.2.0 (thegh release createcommand had an invalid--targetflag, fixed in Fix release action: remove invalid --target flag #114, but npm was already published) - Local environment dependency: Depends on local npm credentials,
ghCLI auth, Node.js version, etc. - Interactive prompts: Prompts for untracked files, making it unsuitable for scripting
- Redundancy: The
release.ymlGitHub Actions workflow already handles all of this properly
Current state
- v0.2.0 was released via
release.ymlbut the GitHub release was never created (the workflow failed ongh release createdue to the--targetbug) release.ymlwas fixed in Fix release action: remove invalid --target flag #114 butscripts/publish.shstill exists as a parallel, fragile pathnpm run releasestill calls the local script
Proposed changes
1. Replace scripts/publish.sh with a GitHub Actions trigger
Replace the local script with a thin wrapper that:
- Validates pre-conditions (clean working directory, on main branch, up-to-date)
- Triggers the
release.ymlworkflow viagh workflow run - Opens the workflow run URL in the browser so the user can monitor progress
This keeps the npm run release convenience but delegates all actual work to CI.
2. Harden release.yml
- Add concurrency protection (
group: release, cancel-in-progress: false) to prevent concurrent releases - Replace
gh release createCLI withsoftprops/action-gh-release@v2(more reliable, used successfully in apify-mcp-server)
3. Update documentation
- Update CLAUDE.md releasing section to reflect the new process
- Update
package.jsonscripts
4. Create missing v0.2.0 GitHub release
Once the process is fixed, create the missing GitHub release for the v0.2.0 tag.
References
- apify-mcp-server's working release workflow:
manual_release_stable.yaml(GitHub Actions only, no local script, usessoftprops/action-gh-release@v2, has concurrency protection) - Fix release action: remove invalid --target flag #114 — fixed the immediate
--targetflag bug but didn't address the underlying fragility
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.