@@ -41,59 +41,41 @@ 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
50+ - name : Stuart Build
51+ run : python Platforms/QemuSbsaPkg/PlatformBuild.py HAF_TFA_BUILD=TRUE
6852
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
53+ - name : Install archive tools
54+ if : github.event_name == 'release'
55+ run : |
56+ apt-get update -y
57+ apt-get install -y zip tar gh
8258
8359 - name : Create per-target archives
60+ if : github.event_name == 'release'
61+ shell : bash
8462 run : |
8563 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
64+ BIN_DIR="Build/QemuSbsaPkg/DEBUG_GCC5/HafTfaBins"
65+ echo "Packaging binaries from ${BIN_DIR}"
66+ if [ ! -d "$BIN_DIR" ]; then
67+ echo "Binary directory not found: $BIN_DIR" >&2
68+ exit 1
69+ fi
70+ ZIP_PATH="${RUNNER_TEMP}/haf-tfa-firmware-${{ github.event.release.tag_name }}.zip"
71+ TAR_PATH="${RUNNER_TEMP}/haf-tfa-firmware-${{ github.event.release.tag_name }}.tar.gz"
72+ (cd "$BIN_DIR" && zip -r "$ZIP_PATH" .)
73+ (cd "$BIN_DIR" && tar -czf "$TAR_PATH" .)
74+ echo "Created archives:"
75+ ls -lh "$ZIP_PATH" "$TAR_PATH"
9576
9677 - name : Upload Release Assets
78+ if : github.event_name == 'release'
9779 env :
9880 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9981 run : |
0 commit comments