Changeset - r28533:5bc5e03633e0
[Not reviewed]
master
0 1 0
Patric Stout - 11 months ago 2024-01-20 23:51:50
truebrain@openttd.org
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.
1 file changed with 33 insertions and 10 deletions:
0 comments (0 inline, 0 general)
.github/workflows/release.yml
Show inline comments
 
@@ -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
0 comments (0 inline, 0 general)