Skip to content

Commit

Permalink
Merge pull request #28 from noir-neo/upload-artifact-discord
Browse files Browse the repository at this point in the history
Add step upload to discord
  • Loading branch information
noir-neo authored Nov 19, 2023
2 parents 52caa81 + 5f56635 commit dc549ab
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,13 @@ jobs:
with:
name: hatbor-macOS-${{ steps.buildStep.outputs.buildVersion }}
path: hatbor.dmg

- name: Upload to Discord
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
FILE: hatbor.dmg
TITLE: ${{ format('macOS {0}', steps.buildStep.outputs.buildVersion) }}
run: |
curl -H 'Content-Type: multipart/form-data' \
-X POST \
-F "file1=@$FILE payload_json={"embeds":[{"title":"$TITLE"}]}" $DISCORD_WEBHOOK
12 changes: 12 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,15 @@ jobs:
with:
name: hatbor-Windows-${{ steps.buildStep.outputs.buildVersion }}
path: build/StandaloneWindows64

- name: Upload to Discord
env:
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) }}
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

0 comments on commit dc549ab

Please sign in to comment.