Skip to content

Commit 3f307fc

Browse files
committed
slack notifications for release and publish actions
1 parent 3e07d56 commit 3f307fc

File tree

2 files changed

+40
-2
lines changed

2 files changed

+40
-2
lines changed

.github/workflows/bump-version.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,21 @@ jobs:
136136
generate_release_notes: ${{ github.event.inputs.release_notes == '' }}
137137
draft: false
138138
prerelease: false
139-
token: ${{ secrets.GITHUB_TOKEN }}
139+
token: ${{ secrets.GITHUB_TOKEN }}
140+
141+
- name: Notify Slack about new version
142+
id: slack
143+
uses: slackapi/[email protected]
144+
with:
145+
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
146+
slack-message: |
147+
:tada: *New Version Released!*
148+
149+
*Package:* codelogic-mcp-server v${{ needs.bump-version.outputs.new_version }}
150+
*Released by:* ${{ github.actor }}
151+
152+
${{ github.event.inputs.release_notes || '_No release notes provided._' }}
153+
154+
:link: <${{ github.server_url }}/${{ github.repository }}/releases/tag/v${{ needs.bump-version.outputs.new_version }}|View Release on GitHub>
155+
env:
156+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

.github/workflows/publish-to-pypi.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,25 @@ jobs:
3232
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
3333
run: |
3434
uv build --no-sources
35-
uv publish --token $PYPI_API_TOKEN
35+
uv publish --token $PYPI_API_TOKEN
36+
37+
- name: Extract package version
38+
id: get_version
39+
run: |
40+
PACKAGE_VERSION=$(python -c "import toml; print(toml.load('pyproject.toml')['project']['version'])")
41+
echo "version=$PACKAGE_VERSION" >> $GITHUB_OUTPUT
42+
43+
- name: Notify Slack about PyPI release
44+
id: slack
45+
uses: slackapi/[email protected]
46+
with:
47+
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
48+
slack-message: |
49+
:rocket: *New Release Published to PyPI!*
50+
51+
*Package:* codelogic-mcp-server v${{ steps.get_version.outputs.version }}
52+
*Published by:* ${{ github.actor }}
53+
54+
:link: <https://pypi.org/project/codelogic-mcp-server/${{ steps.get_version.outputs.version }}|View on PyPI>
55+
env:
56+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

0 commit comments

Comments
 (0)