Skip to content

Commit 06cd925

Browse files
Fixup workflows
1 parent 8180d54 commit 06cd925

File tree

2 files changed

+38
-32
lines changed

2 files changed

+38
-32
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,26 @@ jobs:
2424
id: compile
2525
run: |
2626
msbuild MCGalaxy.sln /p:Configuration=Release /p:TargetFrameworkVersion=v2.0 /p:DefineConstants="NET_20"
27-
28-
- uses: ./.github/actions/notify_failure
29-
if: ${{ always() && steps.compile.outcome == 'failure' }}
30-
with:
31-
NOTIFY_MESSAGE: 'Failed to compile MCGalaxy .NET 2.0 build'
32-
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
3327
3428
- uses: ./.github/actions/upload_build
3529
if: ${{ always() && steps.compile.outcome == 'success' }}
3630
with:
3731
SOURCE_FILE: 'bin/Release'
3832
DEST_NAME: 'MCGalaxy-net2.0'
33+
3934

4035
- uses: ./.github/actions/notify_success
4136
if: ${{ always() && steps.compile.outcome == 'success' }}
4237
with:
4338
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
4439
WORKFLOW_NAME: 'net20'
40+
41+
42+
- uses: ./.github/actions/notify_failure
43+
if: failure()
44+
with:
45+
NOTIFY_MESSAGE: 'Failed to produce MCGalaxy .NET 2.0 build'
46+
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
4547

4648

4749
#============================================
@@ -59,12 +61,6 @@ jobs:
5961
cp -R bin/Release bin/Release_normal
6062
rm bin/Release/MCGalaxy_.dll bin/Release/MCGalaxy_.pdb
6163
msbuild MCGalaxy/MCGalaxy_.csproj /p:Configuration=Release /t:Rebuild /p:DefineConstants="TEN_BIT_BLOCKS"
62-
63-
- uses: ./.github/actions/notify_failure
64-
if: ${{ always() && steps.compile.outcome == 'failure' }}
65-
with:
66-
NOTIFY_MESSAGE: 'Failed to compile MCGalaxy .NET build'
67-
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
6864
6965
- uses: ./.github/actions/upload_build
7066
if: ${{ always() && steps.compile.outcome == 'success' }}
@@ -77,12 +73,20 @@ jobs:
7773
with:
7874
SOURCE_FILE: 'bin/Release'
7975
DEST_NAME: 'MCGalaxy-net40-infid'
76+
8077

8178
- uses: ./.github/actions/notify_success
8279
if: ${{ always() && steps.compile.outcome == 'success' }}
8380
with:
8481
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
8582
WORKFLOW_NAME: 'net40'
83+
84+
85+
- uses: ./.github/actions/notify_failure
86+
if: failure()
87+
with:
88+
NOTIFY_MESSAGE: 'Failed to produce MCGalaxy .NET 4.0 build'
89+
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
8690

8791

8892
#============================================
@@ -103,12 +107,6 @@ jobs:
103107
id: compile
104108
run: |
105109
dotnet build CLI/MCGalaxyCLI_dotnet6.csproj --no-restore
106-
107-
- uses: ./.github/actions/notify_failure
108-
if: ${{ always() && steps.compile.outcome == 'failure' }}
109-
with:
110-
NOTIFY_MESSAGE: 'Failed to compile MCGalaxy dotnet build'
111-
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
112110
113111
- uses: ./.github/actions/upload_build
114112
if: ${{ always() && steps.compile.outcome == 'success' }}
@@ -152,6 +150,13 @@ jobs:
152150
with:
153151
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
154152
WORKFLOW_NAME: 'net60'
153+
154+
155+
- uses: ./.github/actions/notify_failure
156+
if: failure()
157+
with:
158+
NOTIFY_MESSAGE: 'Failed to produce MCGalaxy dotnet 6.0 build'
159+
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
155160

156161

157162
#============================================
@@ -172,12 +177,6 @@ jobs:
172177
id: compile
173178
run: |
174179
dotnet build CLI/MCGalaxyCLI_dotnet8.csproj --no-restore
175-
176-
- uses: ./.github/actions/notify_failure
177-
if: ${{ always() && steps.compile.outcome == 'failure' }}
178-
with:
179-
NOTIFY_MESSAGE: 'Failed to compile MCGalaxy dotnet build'
180-
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
181180
182181
- uses: ./.github/actions/upload_build
183182
if: ${{ always() && steps.compile.outcome == 'success' }}
@@ -191,3 +190,10 @@ jobs:
191190
with:
192191
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
193192
WORKFLOW_NAME: 'net80'
193+
194+
195+
- uses: ./.github/actions/notify_failure
196+
if: failure()
197+
with:
198+
NOTIFY_MESSAGE: 'Failed to produce MCGalaxy dotnet 8.0 build'
199+
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

.github/workflows/release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,6 @@ jobs:
8282
make_standalone_tar mcg-linux64
8383
8484
find .
85-
86-
87-
- uses: ./.github/actions/notify_failure
88-
if: ${{ always() && steps.compile.outcome == 'failure' }}
89-
with:
90-
NOTIFY_MESSAGE: 'Failed to produce release'
91-
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
9285
9386
9487
# Generate .NET release files
@@ -135,4 +128,11 @@ jobs:
135128
if: ${{ always() && steps.compile.outcome == 'success' }}
136129
with:
137130
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
138-
WORKFLOW_NAME: 'release'
131+
WORKFLOW_NAME: 'release'
132+
133+
134+
- uses: ./.github/actions/notify_failure
135+
if: failure()
136+
with:
137+
NOTIFY_MESSAGE: 'Failed to produce release'
138+
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'

0 commit comments

Comments
 (0)