Skip to content

Commit

Permalink
Fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
noir-neo committed Nov 19, 2023
1 parent dc549ab commit 31f528f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ jobs:
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
FILE: hatbor.dmg
TITLE: ${{ format('macOS {0}', steps.buildStep.outputs.buildVersion) }}
CONTENT: ${{ format('hatbor {0} for macOS', steps.buildStep.outputs.buildVersion) }}
run: |
curl -H 'Content-Type: multipart/form-data' \
-X POST \
-F "file1=@$FILE payload_json={"embeds":[{"title":"$TITLE"}]}" $DISCORD_WEBHOOK
curl \
-F 'payload_json={"content":"$CONTENT"}' \
-F "file1=@$FILE" \
$DISCORD_WEBHOOK
9 changes: 5 additions & 4 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ jobs:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DIR: ${{ format('{0}/build/StandaloneWindows64', github.workspace) }}
ZIP: ${{ format('hatbor-Windows-{0}.zip', steps.buildStep.outputs.buildVersion) }}
TITLE: ${{ format('Windows {0}', steps.buildStep.outputs.buildVersion) }}
CONTENT: ${{ format('hatbor {0} for Windows', steps.buildStep.outputs.buildVersion) }}
run: |
zip -qq -r $ZIP $DIR
curl -H 'Content-Type: multipart/form-data' \
-X POST \
-F "file1=@$ZIP payload_json={"embeds":[{"title":"$TITLE"}]}" $DISCORD_WEBHOOK
curl \
-F 'payload_json={"content":"$CONTENT"}' \
-F "file1=@$ZIP" \
$DISCORD_WEBHOOK

0 comments on commit 31f528f

Please sign in to comment.