From 06cd9259e0cd6d575104eba89e2ce6a51d2866b0 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Wed, 17 Sep 2025 20:16:15 +1000 Subject: [PATCH] Fixup workflows --- .github/workflows/build.yml | 54 +++++++++++++++++++---------------- .github/workflows/release.yml | 16 +++++------ 2 files changed, 38 insertions(+), 32 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6618f0795..9e565d4af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,24 +24,26 @@ jobs: id: compile run: | msbuild MCGalaxy.sln /p:Configuration=Release /p:TargetFrameworkVersion=v2.0 /p:DefineConstants="NET_20" - - - uses: ./.github/actions/notify_failure - if: ${{ always() && steps.compile.outcome == 'failure' }} - with: - NOTIFY_MESSAGE: 'Failed to compile MCGalaxy .NET 2.0 build' - WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}' - uses: ./.github/actions/upload_build if: ${{ always() && steps.compile.outcome == 'success' }} with: SOURCE_FILE: 'bin/Release' DEST_NAME: 'MCGalaxy-net2.0' + - uses: ./.github/actions/notify_success if: ${{ always() && steps.compile.outcome == 'success' }} with: DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' WORKFLOW_NAME: 'net20' + + + - uses: ./.github/actions/notify_failure + if: failure() + with: + NOTIFY_MESSAGE: 'Failed to produce MCGalaxy .NET 2.0 build' + WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}' #============================================ @@ -59,12 +61,6 @@ jobs: cp -R bin/Release bin/Release_normal rm bin/Release/MCGalaxy_.dll bin/Release/MCGalaxy_.pdb msbuild MCGalaxy/MCGalaxy_.csproj /p:Configuration=Release /t:Rebuild /p:DefineConstants="TEN_BIT_BLOCKS" - - - uses: ./.github/actions/notify_failure - if: ${{ always() && steps.compile.outcome == 'failure' }} - with: - NOTIFY_MESSAGE: 'Failed to compile MCGalaxy .NET build' - WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}' - uses: ./.github/actions/upload_build if: ${{ always() && steps.compile.outcome == 'success' }} @@ -77,12 +73,20 @@ jobs: with: SOURCE_FILE: 'bin/Release' DEST_NAME: 'MCGalaxy-net40-infid' + - uses: ./.github/actions/notify_success if: ${{ always() && steps.compile.outcome == 'success' }} with: DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' WORKFLOW_NAME: 'net40' + + + - uses: ./.github/actions/notify_failure + if: failure() + with: + NOTIFY_MESSAGE: 'Failed to produce MCGalaxy .NET 4.0 build' + WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}' #============================================ @@ -103,12 +107,6 @@ jobs: id: compile run: | dotnet build CLI/MCGalaxyCLI_dotnet6.csproj --no-restore - - - uses: ./.github/actions/notify_failure - if: ${{ always() && steps.compile.outcome == 'failure' }} - with: - NOTIFY_MESSAGE: 'Failed to compile MCGalaxy dotnet build' - WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}' - uses: ./.github/actions/upload_build if: ${{ always() && steps.compile.outcome == 'success' }} @@ -152,6 +150,13 @@ jobs: with: DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' WORKFLOW_NAME: 'net60' + + + - uses: ./.github/actions/notify_failure + if: failure() + with: + NOTIFY_MESSAGE: 'Failed to produce MCGalaxy dotnet 6.0 build' + WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}' #============================================ @@ -172,12 +177,6 @@ jobs: id: compile run: | dotnet build CLI/MCGalaxyCLI_dotnet8.csproj --no-restore - - - uses: ./.github/actions/notify_failure - if: ${{ always() && steps.compile.outcome == 'failure' }} - with: - NOTIFY_MESSAGE: 'Failed to compile MCGalaxy dotnet build' - WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}' - uses: ./.github/actions/upload_build if: ${{ always() && steps.compile.outcome == 'success' }} @@ -191,3 +190,10 @@ jobs: with: DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' WORKFLOW_NAME: 'net80' + + + - uses: ./.github/actions/notify_failure + if: failure() + with: + NOTIFY_MESSAGE: 'Failed to produce MCGalaxy dotnet 8.0 build' + WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f65128555..3b637bc60 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -82,13 +82,6 @@ jobs: make_standalone_tar mcg-linux64 find . - - - - uses: ./.github/actions/notify_failure - if: ${{ always() && steps.compile.outcome == 'failure' }} - with: - NOTIFY_MESSAGE: 'Failed to produce release' - WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}' # Generate .NET release files @@ -135,4 +128,11 @@ jobs: if: ${{ always() && steps.compile.outcome == 'success' }} with: DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' - WORKFLOW_NAME: 'release' \ No newline at end of file + WORKFLOW_NAME: 'release' + + + - uses: ./.github/actions/notify_failure + if: failure() + with: + NOTIFY_MESSAGE: 'Failed to produce release' + WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'