-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[workspace] Improve slack release message (#3907)
This PR makes the following changes: - move the slack release notification to the end of the `publish-tag.yml` workflow. - add links to the npm release and the teraslice docker container list
- Loading branch information
Showing
2 changed files
with
31 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,24 +102,6 @@ jobs: | |
name: ${{ steps.version_check.outputs.tag }} | ||
generate_release_notes: true | ||
|
||
- name: Announce release in Slack releases channel | ||
if: steps.version_check.outputs.version_updated == 'true' | ||
id: announce-release | ||
uses: slackapi/[email protected] | ||
with: | ||
method: chat.postMessage | ||
token: ${{ secrets.SLACK_BOT_TOKEN }} | ||
payload: | | ||
channel: ${{ vars.SLACK_RELEASES_CHANNEL_ID }} | ||
text: | | ||
Teraslice version ${{ steps.version_check.outputs.tag }} has been released. | ||
Please review and revise the automated release notes: | ||
https://github.com/terascope/teraslice/releases/tag/${{ steps.version_check.outputs.tag }} | ||
- name: Failed Announcement Response | ||
if: ${{ steps.announce-release.outputs.ok == 'false' }} | ||
run: echo "Slackbot API failure response - ${{ steps.announce-release.outputs.response }}" | ||
|
||
build-docs: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ on: | |
jobs: | ||
build-release: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
teraslice_version: ${{ steps.teraslice-version.outputs.teraslice_version }} | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
steps: | ||
|
@@ -19,6 +21,12 @@ jobs: | |
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Retrieve Teraslice version | ||
id: teraslice-version | ||
run: | | ||
TERASLICE_VERSION=$(jq -r .version package.json) | ||
echo "teraslice_version=$TERASLICE_VERSION" >> $GITHUB_OUTPUT | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
|
@@ -67,3 +75,26 @@ jobs: | |
|
||
- name: Publish to docker | ||
run: yarn ts-scripts publish -t tag -n ${{ matrix.node-version }} docker | ||
|
||
slack-announcement: | ||
needs: [build-release, docker-build-publish] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Announce release in Slack releases channel | ||
id: announce-release | ||
uses: slackapi/[email protected] | ||
with: | ||
method: chat.postMessage | ||
token: ${{ secrets.SLACK_BOT_TOKEN }} | ||
payload: | | ||
channel: ${{ vars.SLACK_RELEASES_CHANNEL_ID }} | ||
text: | | ||
Teraslice version `v${{ needs.build-release.outputs.teraslice_version }}` has been released. | ||
Please review and revise the automated release notes: | ||
https://github.com/terascope/teraslice/releases/tag/v${{ needs.build-release.outputs.teraslice_version }} | ||
NPM release: https://www.npmjs.com/package/teraslice/v/${{ needs.build-release.outputs.teraslice_version }} | ||
Docker images: https://github.com/terascope/teraslice/pkgs/container/teraslice | ||
- name: Failed Announcement Response | ||
if: ${{ steps.announce-release.outputs.ok == 'false' }} | ||
run: echo "Slackbot API failure response - ${{ steps.announce-release.outputs.response }}" |