mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-31 03:12:41 +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:
|
with:
|
||||||
version: ${{ needs.source.outputs.version }}
|
version: ${{ needs.source.outputs.version }}
|
||||||
|
|
||||||
upload-cdn:
|
upload:
|
||||||
name: Upload (CDN)
|
name: Upload
|
||||||
needs:
|
needs:
|
||||||
- source
|
- source
|
||||||
- docs
|
- docs
|
||||||
@ -101,6 +101,25 @@ jobs:
|
|||||||
# The always() makes sure the rest is always evaluated.
|
# 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')
|
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
|
uses: ./.github/workflows/upload-cdn.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
@ -113,11 +132,13 @@ jobs:
|
|||||||
name: Upload (Steam)
|
name: Upload (Steam)
|
||||||
needs:
|
needs:
|
||||||
- source
|
- source
|
||||||
- linux
|
- upload
|
||||||
- macos
|
|
||||||
- windows
|
|
||||||
|
|
||||||
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
|
uses: ./.github/workflows/upload-steam.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
@ -130,11 +151,13 @@ jobs:
|
|||||||
name: Upload (GOG)
|
name: Upload (GOG)
|
||||||
needs:
|
needs:
|
||||||
- source
|
- source
|
||||||
- linux
|
- upload
|
||||||
- macos
|
|
||||||
- windows
|
|
||||||
|
|
||||||
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
|
uses: ./.github/workflows/upload-gog.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
Loading…
Reference in New Issue
Block a user