Skip to content

Commit

Permalink
fancy discord uploading
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysdh540 committed Aug 2, 2023
1 parent 2437271 commit 364e1c5
Showing 1 changed file with 37 additions and 3 deletions.
40 changes: 37 additions & 3 deletions .github/workflows/build-multiver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@ name: build (multiversion branch)
on: [ pull_request, push ]

jobs:
webhook-message:
runs-on: ubuntu-latest
steps:
- name: Get branch name
id: get_branch
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT

- name: send building message to discord
if: "!startsWith(github.event.head_commit.message, '[skip]')"
uses: realRobotix/action-discord-notifier@release-master
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
message-title: Building mod from branch ${{ steps.get_branch.outputs.branch }}

- name: send not building message to discord
if: "startsWith(github.event.head_commit.message, '[skip]')"
uses: realRobotix/action-discord-notifier@release-master
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
message-title: Build skipped for branch ${{ steps.get_branch.outputs.branch }}
build_1_19:
if: "!startsWith(github.event.head_commit.message, '[skip]')"
strategy:
Expand Down Expand Up @@ -45,12 +65,19 @@ jobs:
name: cu-artifacts-fabric
path: fabric/build/libs/*.jar

- name: upload merged build artifact
- name: upload merged build artifact to github
uses: actions/upload-artifact@v3
with:
name: cu-artifacts-merged
path: |
build/libs/merged/*.jar
- name: upload merged build artifact to discord
uses: sinshutu/upload-to-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: build/libs/merged/*.jar
build_1_20:
if: "!startsWith(github.event.head_commit.message, '[skip]')"
strategy:
Expand Down Expand Up @@ -95,9 +122,16 @@ jobs:
name: cu-artifacts-fabric
path: fabric/build/libs/*.jar

- name: upload merged build artifact
- name: upload merged build artifact to github
uses: actions/upload-artifact@v3
with:
name: cu-artifacts-merged
path: |
build/libs/merged/*.jar
build/libs/merged/*.jar
- name: upload merged build artifact to discord
uses: sinshutu/upload-to-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: build/libs/merged/*.jar

0 comments on commit 364e1c5

Please sign in to comment.