Skip to content

Commit

Permalink
Merge pull request #1025 from Sage-Bionetworks/develop-slackReleasebot
Browse files Browse the repository at this point in the history
Added a slack bot to notify successful new releases
  • Loading branch information
linglp authored Nov 22, 2022
2 parents f55bf4c + b348473 commit 1887b0a
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,29 @@ jobs:
# publish to pypi
#----------------------------------------------
- name: Publish package to Pypi
id: publish-to-pypi
if: steps.check-tag.outputs.match == 'true'
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
PYPI_USERNAME: __token__
run: |
poetry publish --build --username $PYPI_USERNAME --password $PYPI_TOKEN
poetry publish --build --username $PYPI_USERNAME --password $PYPI_TOKEN
#----------------------------------------------
# post a message to slack
#----------------------------------------------

- name: Post to a Slack channel
if: steps.publish-to-pypi.outcome == 'success'
id: slack
uses: slackapi/[email protected]
with:
# Slack channel id, channel name, or user id to post message.
# See also: https://api.slack.com/methods/chat.postMessage#channels
# You can pass in multiple channels to post to by providing a comma-delimited list of channel IDs.
# ibc-fair-data channel and data-curator-schematic channel
channel-id: 'C01HSSMPQBG,C01ANC02U59'
# For posting a simple plain text message
slack-message: "Schematic has just been released. Check out new version: ${{ github.ref_name }}"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

0 comments on commit 1887b0a

Please sign in to comment.