Skip to content

Commit eaca573

Browse files
Merge pull request #16 from superstreamlabs/skip-beta-not
skip beta release
2 parents 8ce3fbf + 635e9ae commit eaca573

File tree

2 files changed

+14
-27
lines changed

2 files changed

+14
-27
lines changed

.github/workflows/release.yaml

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
outputs:
1515
version: ${{ steps.get_version.outputs.version }}
1616
status: ${{ job.status }}
17-
17+
1818
steps:
1919
- name: Checkout code
2020
uses: actions/checkout@v4
@@ -56,7 +56,7 @@ jobs:
5656
outputs:
5757
version: ${{ steps.get_version.outputs.version }}
5858
status: ${{ job.status }}
59-
59+
6060
steps:
6161
- name: Checkout code
6262
uses: actions/checkout@v4
@@ -109,36 +109,23 @@ jobs:
109109
notify:
110110
name: Send Notifications
111111
runs-on: ubuntu-latest
112-
needs: [beta-release, prod-release]
113-
if: always()
112+
needs: prod-release
113+
if: always() && github.ref == 'refs/heads/latest'
114114

115115
steps:
116-
- name: Determine release type and status
117-
id: release_info
118-
run: |
119-
if [ "${{ github.ref }}" == "refs/heads/master" ]; then
120-
echo "type=Beta" >> $GITHUB_OUTPUT
121-
echo "version=${{ needs.beta-release.outputs.version }}" >> $GITHUB_OUTPUT
122-
echo "result=${{ needs.beta-release.result }}" >> $GITHUB_OUTPUT
123-
else
124-
echo "type=Production" >> $GITHUB_OUTPUT
125-
echo "version=${{ needs.prod-release.outputs.version }}" >> $GITHUB_OUTPUT
126-
echo "result=${{ needs.prod-release.result }}" >> $GITHUB_OUTPUT
127-
fi
128-
129116
- name: Send Slack notification on success
130-
if: steps.release_info.outputs.result == 'success'
117+
if: needs.prod-release.result == 'success'
131118
uses: slackapi/slack-github-action@v1
132119
with:
133120
payload: |
134121
{
135-
"text": "superstream-python-clients v${{ steps.release_info.outputs.version }} ${{ steps.release_info.outputs.type }} Release SUCCESSFUL ✅",
122+
"text": "superstream-python-clients v${{ needs.prod-release.outputs.version }} Production Release SUCCESSFUL ✅",
136123
"blocks": [
137124
{
138125
"type": "section",
139126
"text": {
140127
"type": "mrkdwn",
141-
"text": "*superstream-python-clients v${{ steps.release_info.outputs.version }} ${{ steps.release_info.outputs.type }} Release SUCCESSFUL* ✅\n*Branch:* ${{ github.ref_name }}\n*Commit:* <${{ github.event.head_commit.url }}|${{ github.sha }}>\n*Author:* ${{ github.event.head_commit.author.name }}\n*Message:* ${{ github.event.head_commit.message }}"
128+
"text": "*superstream-python-clients v${{ needs.prod-release.outputs.version }} Production Release SUCCESSFUL* ✅\n*Branch:* ${{ github.ref_name }}\n*Commit:* <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>\n*Author:* ${{ github.event.head_commit.author.name }}\n*Release:* <${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ needs.prod-release.outputs.version }}|View Release>"
142129
}
143130
}
144131
]
@@ -148,18 +135,18 @@ jobs:
148135
continue-on-error: true
149136

150137
- name: Send Slack notification on failure
151-
if: steps.release_info.outputs.result == 'failure'
138+
if: needs.prod-release.result == 'failure'
152139
uses: slackapi/slack-github-action@v1
153140
with:
154141
payload: |
155142
{
156-
"text": "superstream-python-clients v${{ steps.release_info.outputs.version }} ${{ steps.release_info.outputs.type }} Release FAILED ❌",
143+
"text": "superstream-python-clients v${{ needs.prod-release.outputs.version }} Production Release FAILED ❌",
157144
"blocks": [
158145
{
159146
"type": "section",
160147
"text": {
161148
"type": "mrkdwn",
162-
"text": "*superstream-python-clients v${{ steps.release_info.outputs.version }} ${{ steps.release_info.outputs.type }} Release FAILED* ❌\n*Branch:* ${{ github.ref_name }}\n*Commit:* <${{ github.event.head_commit.url }}|${{ github.sha }}>\n*Author:* ${{ github.event.head_commit.author.name }}\n*Workflow Run:* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Details>"
149+
"text": "*superstream-python-clients v${{ needs.prod-release.outputs.version }} Production Release FAILED* ❌\n*Branch:* ${{ github.ref_name }}\n*Commit:* <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>\n*Author:* ${{ github.event.head_commit.author.name }}\n*Workflow Run:* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Details>"
163150
}
164151
}
165152
]
@@ -169,18 +156,18 @@ jobs:
169156
continue-on-error: true
170157

171158
- name: Send Slack notification on cancellation
172-
if: steps.release_info.outputs.result == 'cancelled'
159+
if: needs.prod-release.result == 'cancelled'
173160
uses: slackapi/slack-github-action@v1
174161
with:
175162
payload: |
176163
{
177-
"text": "superstream-python-clients v${{ steps.release_info.outputs.version }} ${{ steps.release_info.outputs.type }} Release ABORTED ⚠️",
164+
"text": "superstream-python-clients v${{ needs.prod-release.outputs.version }} Production Release ABORTED ⚠️",
178165
"blocks": [
179166
{
180167
"type": "section",
181168
"text": {
182169
"type": "mrkdwn",
183-
"text": "*superstream-python-clients v${{ steps.release_info.outputs.version }} ${{ steps.release_info.outputs.type }} Release ABORTED* ⚠️\n*Branch:* ${{ github.ref_name }}\n*Commit:* <${{ github.event.head_commit.url }}|${{ github.sha }}>\n*Author:* ${{ github.event.head_commit.author.name }}"
170+
"text": "*superstream-python-clients v${{ needs.prod-release.outputs.version }} Production Release ABORTED* ⚠️\n*Branch:* ${{ github.ref_name }}\n*Commit:* <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>\n*Author:* ${{ github.event.head_commit.author.name }}"
184171
}
185172
}
186173
]

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "superstream-clients"
7-
version = "1.0.2"
7+
version = "1.0.3"
88
description = "Superstream optimisation library for Kafka producers"
99
authors = [{name = "Superstream Labs", email = "[email protected]"}]
1010
license = "Apache-2.0"

0 commit comments

Comments
 (0)