@@ -41,61 +41,36 @@ jobs:
4141 git config --global user.email "github-actions[bot]@users.noreply.github.com"
4242 git config --global --add safe.directory $GITHUB_WORKSPACE
4343
44- - name : Stuart Build and Run
45- uses : ./.github/actions/build-platform
46- with :
47- platform-config : ' Platforms/QemuSbsaPkg/PlatformBuild.py'
48- platform-name : ' SBSA'
49- tool-chain : ' GCC5'
50- stuart-args : ' HAF_TFA_BUILD=TRUE'
51- publish-logs : ' true'
44+ - name : Stuart Setup
45+ run : python Platforms/QemuSbsaPkg/PlatformBuild.py --setup
5246
53- - name : Upload Firmware Binaries (artifacts)
54- uses : actions/upload-artifact@v4
55- with :
56- # One artifact per matrix target so they don't overwrite each other
57- name : haf-tfa-firmware
58- if-no-files-found : error
59- path : |
60- Build/QemuSbsaPkg/DEBUG_GCC5/HafTfaBins/**
61- retention-days : 14
47+ - name : Stuart Update
48+ run : python Platforms/QemuSbsaPkg/PlatformBuild.py --update
6249
63- publish :
64- name : Publish HAF/TFA Firmware Binaries
65- needs : build
66- if : github.event_name == 'release'
67- runs-on : ubuntu-latest
68-
69- permissions :
70- contents : write
71-
72- steps :
73- - name : Checkout
74- uses : actions/checkout@v4
75- with :
76- fetch-depth : 0
77-
78- - name : Download Artifacts
79- uses : actions/download-artifact@v4
80- with :
81- path : ${{ runner.temp }}/artifacts
50+ - name : Stuart Build
51+ run : python Platforms/QemuSbsaPkg/PlatformBuild.py HAF_TFA_BUILD=TRUE
8252
8353 - name : Create per-target archives
54+ if : github.event_name == 'release'
8455 run : |
8556 set -euo pipefail
86- cd "${RUNNER_TEMP}/artifacts"
87- for d in */ ; do
88- d="${d%/}"
89- echo "Zipping $d ..."
90- ( cd "$d" && zip -r "${RUNNER_TEMP}/${d}-${{ github.event.release.tag_name }}.zip" . )
91- ( cd "$d" && tar -czf "${RUNNER_TEMP}/${d}-${{ github.event.release.tag_name }}.tar.gz" . )
92- done
93- echo "Done creating archives:"
94- ls -lh "${RUNNER_TEMP}"/*.zip "${RUNNER_TEMP}"/*.tar.gz
57+ BIN_DIR="Build/QemuSbsaPkg/DEBUG_GCC5/HafTfaBins"
58+ echo "Packaging binaries from ${BIN_DIR}"
59+ if [ ! -d "$BIN_DIR" ]; then
60+ echo "Binary directory not found: $BIN_DIR" >&2
61+ exit 1
62+ fi
63+ ZIP_PATH="${RUNNER_TEMP}/haf-tfa-firmware-${{ github.event.release.tag_name }}.zip"
64+ TAR_PATH="${RUNNER_TEMP}/haf-tfa-firmware-${{ github.event.release.tag_name }}.tar.gz"
65+ (cd "$BIN_DIR" && zip -r "$ZIP_PATH" .)
66+ (cd "$BIN_DIR" && tar -czf "$TAR_PATH" .)
67+ echo "Created archives:"
68+ ls -lh "$ZIP_PATH" "$TAR_PATH"
9569
9670 - name : Upload Release Assets
71+ if : github.event_name == 'release'
9772 env :
9873 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9974 run : |
100- gh release upload "${{ github.event.release.tag_name }}" "${RUNNER_TEMP}"/*.zip
101- gh release upload "${{ github.event.release.tag_name }}" "${RUNNER_TEMP}"/*.tar.gz
75+ gh release upload "${{ github.event.release.tag_name }}" "${RUNNER_TEMP}"/*.zip
76+ gh release upload "${{ github.event.release.tag_name }}" "${RUNNER_TEMP}"/*.tar.gz
0 commit comments