Skip to content

Commit 578b9ba

Browse files
committed
fixup! use GITHUB_OUTPUT
1 parent 0932fda commit 578b9ba

1 file changed

Lines changed: 46 additions & 17 deletions

File tree

.github/workflows/build.yml

Lines changed: 46 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -593,13 +593,26 @@ jobs:
593593
}
594594
working-directory: packages/app/example
595595
continue-on-error: true
596-
- name: Set build status
597-
if: ${{ steps.affected.outputs.windows != '' && steps.build.outcome != 'success' }}
596+
- name: Set build result
597+
id: build_result
598+
if: ${{ steps.affected.outputs.windows != '' }}
598599
run: |
599-
echo "result=failed" >> "$GITHUB_OUTPUT"
600+
path=${{ format('windows-build.{0}.{1}.result', matrix.platform, matrix.configuration) }}
601+
echo "${{ steps.build.outcome }}" >> $path
602+
echo "path=$path" >> "$GITHUB_OUTPUT"
603+
shell: bash
604+
- name: Upload build result
605+
if: ${{ steps.affected.outputs.windows != '' }}
606+
uses: actions/upload-artifact@v7
607+
with:
608+
name: ${{ steps.build_result.outputs.path }}
609+
path: ${{ steps.build_result.outputs.path }}
610+
retention-days: 1
611+
archive: false
612+
overwrite: true
600613
- name: Upload build logs
601614
if: ${{ steps.affected.outputs.windows != '' && steps.build.outcome != 'success' }}
602-
uses: actions/upload-artifact@v6
615+
uses: actions/upload-artifact@v7
603616
with:
604617
name: windows-msbuild.binlog
605618
path: packages/app/example/windows/*.binlog
@@ -653,13 +666,26 @@ jobs:
653666
yarn windows --logging --no-packager --no-launch --no-deploy
654667
working-directory: template-example
655668
continue-on-error: true
656-
- name: Set build status
657-
if: ${{ steps.affected.outputs.windows != '' && steps.build.outcome != 'success' }}
669+
- name: Set build result
670+
id: build_result
671+
if: ${{ steps.affected.outputs.windows != '' }}
658672
run: |
659-
echo "result=failed" >> "$GITHUB_OUTPUT"
673+
path=${{ format('windows-template-build.{0}.result', matrix.template) }}
674+
echo "${{ steps.build.outcome }}" >> $path
675+
echo "path=$path" >> "$GITHUB_OUTPUT"
676+
shell: bash
677+
- name: Upload build result
678+
if: ${{ steps.affected.outputs.windows != '' }}
679+
uses: actions/upload-artifact@v7
680+
with:
681+
name: ${{ steps.build_result.outputs.path }}
682+
path: ${{ steps.build_result.outputs.path }}
683+
retention-days: 1
684+
archive: false
685+
overwrite: true
660686
- name: Upload build logs
661687
if: ${{ steps.affected.outputs.windows != '' && steps.build.outcome != 'success' }}
662-
uses: actions/upload-artifact@v6
688+
uses: actions/upload-artifact@v7
663689
with:
664690
name: windows-template-msbuild.binlog
665691
path: template-example/windows/*.binlog
@@ -675,17 +701,20 @@ jobs:
675701
- windows
676702
- windows-template
677703
steps:
678-
- name: Results
679-
run: |
680-
echo '${{ toJSON(needs) }}'
681-
echo '${{ toJSON(needs.windows.outputs) }}'
682-
echo '${{ toJSON(needs.windows-template.outputs) }}'
704+
- name: Download build results
705+
uses: actions/download-artifact@v8
706+
with:
707+
path: results
708+
pattern: "windows-*.result"
709+
merge-multiple: true
683710
- name: Warn if Windows builds failed
684-
if: ${{ needs.windows.outputs.result == 'failed' || needs.windows-template.outputs.result == 'failed' }}
685711
run: |
686-
echo "::warning::One or more Windows build jobs failed. This is non-blocking but should be investigated."
687-
echo "Windows build result: ${{ needs.windows.outputs.result }}"
688-
echo "Windows template build result: ${{ needs.windows-template.outputs.result }}"
712+
for file in results/*; do
713+
echo "$(basename $file): $(cat $file)"
714+
if grep -q fail "$file"; then
715+
echo -n "::warning::$(basename $file): Build failed (this is non-blocking but should be investigated)"
716+
fi
717+
done
689718
release:
690719
permissions:
691720
contents: write # create releases (Nx Release)

0 commit comments

Comments
 (0)