Skip to content

Commit 136c0c6

Browse files
committed
refactor(ci): Update Release announcement workflow.
Make it part of the `Release new version` GH Action workflow, dependent of the `github-release` and `publish-to-pypi` job steps. This will avoid announcement of the AWS Lambda releases. Signed-off-by: Paulo Vital <[email protected]>
1 parent dddb821 commit 136c0c6

File tree

2 files changed

+37
-65
lines changed

2 files changed

+37
-65
lines changed

.github/workflows/pkg_release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,40 @@ jobs:
8080
path: dist/
8181
- name: Publish to PyPI
8282
uses: pypa/gh-action-pypi-publish@release/v1
83+
84+
notify-slack:
85+
name: Notify on Slack
86+
needs:
87+
- github-release
88+
- publish-to-pypi
89+
runs-on: ubuntu-latest
90+
permissions:
91+
contents: read
92+
93+
steps:
94+
- name: Checkout code
95+
uses: actions/checkout@v4
96+
with:
97+
fetch-depth: 0 # Fetch all history to access commit messages
98+
99+
- name: Set up Python
100+
uses: actions/setup-python@v4
101+
with:
102+
python-version: '3.13'
103+
104+
- name: Install dependencies
105+
run: |
106+
pip install httpx PyGithub
107+
108+
# Send notification using the safely set environment variables
109+
- name: Send Slack notification
110+
env:
111+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112+
GITHUB_RELEASE_TAG: ${{ github.ref_name }}
113+
SLACK_TOKEN: ${{ secrets.RUPY_TRACER_RELEASES_TOKEN }}
114+
SLACK_SERVICE: ${{ secrets.RUPY_TRACER_RELEASES_CHANNEL_ID }}
115+
SLACK_TEAM: ${{ secrets.RUPY_TOWN_CRIER_SERVICE_ID }}
116+
run: |
117+
echo "New release published ${GITHUB_RELEASE_TAG}"
118+
python .github/scripts/announce_release_on_slack.py
119+

.github/workflows/release-notification-on-slack.yml

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)