mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-18 13:14:34 +00:00
Fix: [CI] wait for all targets to succeeded before uploading to any (#11845)
Otherwise it is possible Steam upload happens while CDN upload does not, which is a bit awkward.
This commit is contained in:
parent
526a0db956
commit
66a16d5ddf
43
.github/workflows/release.yml
vendored
43
.github/workflows/release.yml
vendored
@ -86,8 +86,8 @@ jobs:
|
||||
with:
|
||||
version: ${{ needs.source.outputs.version }}
|
||||
|
||||
upload-cdn:
|
||||
name: Upload (CDN)
|
||||
upload:
|
||||
name: Upload
|
||||
needs:
|
||||
- source
|
||||
- docs
|
||||
@ -101,6 +101,25 @@ jobs:
|
||||
# The always() makes sure the rest is always evaluated.
|
||||
if: always() && needs.source.result == 'success' && needs.docs.result == 'success' && needs.linux-legacy.result == 'success' && needs.linux.result == 'success' && needs.macos.result == 'success' && needs.windows.result == 'success' && (needs.windows-store.result == 'success' || needs.windows-store.result == 'skipped')
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# This job is empty, but ensures no upload job starts before all targets finished and are successful.
|
||||
steps:
|
||||
- name: Build completed
|
||||
run: |
|
||||
true
|
||||
|
||||
upload-cdn:
|
||||
name: Upload (CDN)
|
||||
needs:
|
||||
- source
|
||||
- upload
|
||||
|
||||
# As windows-store is condition, we need to check ourselves if we need to run.
|
||||
# The always() makes sure the rest is always evaluated.
|
||||
# Yes, you even need to do this if you yourself don't depend on the condition.
|
||||
if: always() && needs.source.result == 'success' && needs.upload.result == 'success'
|
||||
|
||||
uses: ./.github/workflows/upload-cdn.yml
|
||||
secrets: inherit
|
||||
|
||||
@ -113,11 +132,13 @@ jobs:
|
||||
name: Upload (Steam)
|
||||
needs:
|
||||
- source
|
||||
- linux
|
||||
- macos
|
||||
- windows
|
||||
- upload
|
||||
|
||||
if: needs.source.outputs.trigger_type == 'new-master' || needs.source.outputs.trigger_type == 'new-tag'
|
||||
# As windows-store is condition, we need to check ourselves if we need to run.
|
||||
# The always() makes sure the rest is always evaluated.
|
||||
# Yes, you even need to do this if you yourself don't depend on the condition.
|
||||
# Additionally, only nightlies and releases go to Steam; not PRs.
|
||||
if: always() && needs.source.result == 'success' && needs.upload.result == 'success' && (needs.source.outputs.trigger_type == 'new-master' || needs.source.outputs.trigger_type == 'new-tag')
|
||||
|
||||
uses: ./.github/workflows/upload-steam.yml
|
||||
secrets: inherit
|
||||
@ -130,11 +151,13 @@ jobs:
|
||||
name: Upload (GOG)
|
||||
needs:
|
||||
- source
|
||||
- linux
|
||||
- macos
|
||||
- windows
|
||||
- upload
|
||||
|
||||
if: needs.source.outputs.trigger_type == 'new-tag'
|
||||
# As windows-store is condition, we need to check ourselves if we need to run.
|
||||
# The always() makes sure the rest is always evaluated.
|
||||
# Yes, you even need to do this if you yourself don't depend on the condition.
|
||||
# Additionally, only releases go to GOG; not nightlies or PRs.
|
||||
if: always() && needs.source.result == 'success' && needs.upload.result == 'success' && needs.source.outputs.trigger_type == 'new-tag'
|
||||
|
||||
uses: ./.github/workflows/upload-gog.yml
|
||||
secrets: inherit
|
||||
|
Loading…
Reference in New Issue
Block a user