Skip to content

Commit affbe07

Browse files
author
Drew Yang
committed
fix: 🐛 fix reusable workflow call bug
1 parent 166b6d5 commit affbe07

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.github/workflows/post_release.yaml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ on:
1111

1212
jobs:
1313
call-publish-docs:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: ./.github/workflows/docs.yaml
14+
uses: ./.github/workflows/docs.yaml
1715
update-version:
1816
permissions:
1917
# write permission is required to update version.py
@@ -28,8 +26,8 @@ jobs:
2826
id: update_version
2927
run: |
3028
VERSION=$(echo "${{ github.event.release.name }}" | grep -oP '\d+\.\d+\.\d+')
31-
echo "VERSION=$VERSION" >> $GITHUB_ENV
3229
sed -i "s/^__version__ = .*/__version__ = \"$VERSION\"/" datajoint/version.py
30+
cat datajoint/version.py
3331
# Commit the changes
3432
git config --global user.name "github-actions"
3533
git config --global user.email "[email protected]"
@@ -39,11 +37,21 @@ jobs:
3937
slack-notification:
4038
runs-on: ubuntu-latest
4139
steps:
42-
- name: Post text to a Slack channel
40+
- name: Post a message in a channel
4341
uses: slackapi/[email protected]
4442
with:
45-
method: chat.postMessage
46-
token: ${{ secrets.SLACK_BOT_TOKEN }}
43+
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
44+
webhook-type: incoming-webhook
4745
payload: |
48-
channel: ${{ secrets.SLACK_CHANNEL_ID }}
49-
text: "howdy <@channel>!"
46+
{
47+
"text": "*New Release Published!* :tada: \n*Repository:* ${{ github.repository }}\n*Version:* ${{ github.event.release.tag_name }}\n*URL:* ${{ github.event.release.html_url }}",
48+
"blocks": [
49+
{
50+
"type": "section",
51+
"text": {
52+
"type": "mrkdwn",
53+
"text": "*New Release Published!* :tada:\n*Repository:* ${{ github.repository }}\n*Version:* ${{ github.event.release.tag_name }}\n*URL:* <${{ github.event.release.html_url }}|View Release>"
54+
}
55+
}
56+
]
57+
}

0 commit comments

Comments
 (0)