Manual release run#23
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the GitHub Actions release workflow to support manual (workflow_dispatch) npm publishes for @datacline/smcp, in addition to the existing tag-push trigger.
Changes:
- Added
workflow_dispatchwith a requiredtaginput and updated checkout to use that ref for manual runs. - Centralized “release tag” resolution and reused it for version validation + GitHub release creation.
- Made GitHub release creation conditional and simplified the package “pack” verification step.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment on lines
+48
to
+52
| TAG="$(printf '%s' "$RAW_TAG" | sed -E 's/^[[:space:]]+//; s/[[:space:]]+$//; s#^refs/tags/##')" | ||
| else | ||
| TAG="${GITHUB_REF#refs/tags/}" | ||
| fi | ||
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" |
| @@ -28,16 +36,25 @@ jobs: | |||
|
|
|||
| - run: npm ci --workspace @datacline/smcp --include-workspace-root | |||
|
|
|||
Comment on lines
+72
to
+83
| const requiredFiles = [ | ||
| "dist/smcp.cjs", | ||
| "dist/smcp.mjs", | ||
| ]; | ||
|
|
||
| const forbiddenPatterns = [ | ||
| /^src\//, | ||
| /^test\//, | ||
| /^tests\//, | ||
| /^scripts\//, | ||
| /^\.github\//, | ||
| /(^|\/)tsconfig(\.[^/]+)?\.json$/, |
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
Add manual workflow_dispatch support to the release workflow so npm publishing for @datacline/smcp can be triggered from the GitHub Actions UI, not only from tag pushes.
Changes
Added workflow_dispatch to .github/workflows/release.yml
Added a required tag input for manual release runs
Updated checkout logic so manual runs check out the provided tag
Added a shared release-tag resolution step for both tag-push and manual runs
Kept version validation so the selected tag must match packages/smcp/package.json
Made GitHub release creation conditional so manual runs do not fail if the release already exists
Removed stale package-specific steps in the workflow that did not match the current @datacline/smcp setup
Test plan
npm run lint --workspace @datacline/smcpcleannpm run build --workspace @datacline/smcpclean (ESM + CJS indist/)npm test --workspace @datacline/smcppassesnpm pack --dry-run --workspace @datacline/smcpshows expected files onlysmcpcommands against a running gatewayBreaking changes?
NO
Gateway / policy-engine changes?
No. This change is limited to the GitHub Actions release workflow for publishing the CLI package.