Skip to content

Commit f620c80

Browse files
chore: enforce release branch for latest channel publishing (#143)
* chore: enforce release branch for latest channel publishing Add validation to ensure latest channel publishes only from release/* branches. Co-authored-by: Cursor <cursoragent@cursor.com> * chore: update Slack message --------- Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 2d1cbba commit f620c80

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/publish.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ jobs:
2626
working-directory: ./mcp-server
2727

2828
steps:
29+
- name: Validate release branch for latest channel
30+
if: github.event.inputs.channel == 'latest'
31+
run: |
32+
if [[ ! "${{ github.ref }}" =~ ^refs/(heads|tags)/release/ ]]; then
33+
echo "Error: Publishing to 'latest' channel requires a release/* branch or tag"
34+
echo "Current ref: ${{ github.ref }}"
35+
exit 1
36+
fi
37+
2938
- uses: actions/checkout@v4
3039
with:
3140
# PR context: build from PR head; workflow_dispatch: build from triggered ref (e.g. release/x.y.z)
@@ -75,7 +84,7 @@ jobs:
7584
"type": "section",
7685
"text": {
7786
"type": "mrkdwn",
78-
"text": "*Release: ${{ steps.extract_version.outputs.package_version }}* has been marked as complete in Linear.\n\n<${{ steps.release.outputs.release-url }}|View Release Notes>"
87+
"text": "*🚀Release: @currents/mcp@${{ steps.extract_version.outputs.package_version }}* has been marked as complete in Linear.\n\n<${{ steps.release.outputs.release-url }}|View Release Notes>"
7988
}
8089
}
8190
]

0 commit comments

Comments
 (0)