mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
Refactor webhook in CD
This commit is contained in:
20
.github/workflows/CD.yml
vendored
20
.github/workflows/CD.yml
vendored
@@ -13,6 +13,10 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2.3.3
|
uses: actions/checkout@v2.3.3
|
||||||
|
|
||||||
|
- name: Get release version
|
||||||
|
id: get-version
|
||||||
|
uses: dawidd6/action-get-tag@v1
|
||||||
|
|
||||||
- name: Install .NET
|
- name: Install .NET
|
||||||
uses: actions/setup-dotnet@v1.7.2
|
uses: actions/setup-dotnet@v1.7.2
|
||||||
with:
|
with:
|
||||||
@@ -25,7 +29,15 @@ jobs:
|
|||||||
run: dotnet nuget push CliFx/bin/Release/*.nupkg -s nuget.org -k ${{ secrets.NUGET_TOKEN }}
|
run: dotnet nuget push CliFx/bin/Release/*.nupkg -s nuget.org -k ${{ secrets.NUGET_TOKEN }}
|
||||||
|
|
||||||
- name: Notify Discord
|
- name: Notify Discord
|
||||||
run: |
|
uses: satak/webrequest-action@v1.2.4
|
||||||
curl '${{ secrets.DISCORD_WEBHOOK }}' \
|
with:
|
||||||
--data-raw '{"content":"**CliFx** new version released!\nRef: `${{ github.ref }}`\nChangelog: <https://github.com/Tyrrrz/CliFx/blob/${{ github.sha }}/Changelog.md>"}' \
|
url: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
-H 'content-type: application/json'
|
method: POST
|
||||||
|
headers: |
|
||||||
|
{
|
||||||
|
"ContentType": "application/json; charset=UTF-8"
|
||||||
|
}
|
||||||
|
payload: |
|
||||||
|
{
|
||||||
|
"content": "**CliFx** new version released!\nVersion: `${{ steps.get-version.outputs.tag }}`\nChangelog: <https://github.com/Tyrrrz/CliFx/blob/${{ steps.get-version.outputs.tag }}/Changelog.md>"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user