Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notify Slack on successful release deploy #52

Merged
merged 2 commits into from
Oct 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,23 @@ jobs:
run: >
dotnet nuget push **/*.nupkg
--source https://api.nuget.org/v3/index.json
--api-key ${{ secrets.nuget_api_key }}
--api-key ${{ secrets.nuget_api_key }}

# Notify the Slack channel about the release
notify:
if: ${{ github.event_name == 'release' }}
needs: deploy
runs-on: ubuntu-latest

steps:
- name: Send Slack message
uses: tyrrrz/action-http-request@28a403e52ea0f292b85a1850aeab1b90abc54be0 # 1.0.0
with:
url: ${{ secrets.SLACK_WEBHOOK_URL }}
method: POST
headers: |
Content-Type: application/json; charset=UTF-8
body: |
{
"text": "Passwordless.NET new version released!\nVersion: `${{ github.event.release.name }}`\nDetails: ${{ github.event.release.html_url }}"
}
Loading