Skip to content

Commit

Permalink
Merge pull request #29 from noir-neo/upload-artifact-discord
Browse files Browse the repository at this point in the history
Fix workflow
  • Loading branch information
noir-neo authored Nov 19, 2023
2 parents dc549ab + 31f528f commit 2dcf04d
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 2dcf04d

Please sign in to comment.