Преглед на файлове

Upload CI firmware artifacts individually without zip outputs

copilot-swe-agent[bot] преди 3 месеца
родител
ревизия
6d3fbe73e9
променени са 2 файла, в които са добавени 30 реда и са изтрити 33 реда
  1. 28 30
      .github/workflows/build.yml
  2. 2 3
      .github/workflows/release.yml

+ 28 - 30
.github/workflows/build.yml

@@ -121,36 +121,34 @@ jobs:
         run: |
           find build/openpuck build/reversepuck -maxdepth 1 -type f -print | sort
 
-      - name: Stage build artifacts
-        env:
-          ARTIFACT_VERSION: ${{ steps.build_version.outputs.artifact_version }}
-        run: |
-          set -eu
-          shopt -s nullglob
-          mkdir -p build/artifacts
-
-          for ext in uf2 bin hex elf map zip; do
-            for f in build/openpuck/*.${ext}; do
-              base="$(basename "$f")"
-              stem="${base%.*}"
-              cp "$f" "build/artifacts/${stem}-${ARTIFACT_VERSION}.${ext}"
-            done
-          done
-
-          for ext in uf2 bin hex elf map zip; do
-            for f in build/reversepuck/*.${ext}; do
-              base="$(basename "$f")"
-              stem="${base%.*}"
-              cp "$f" "build/artifacts/${stem}-${ARTIFACT_VERSION}.${ext}"
-            done
-          done
-
-          ls -la build/artifacts
-
-      - name: Upload build artifacts
+      - name: Upload OpenPuck UF2 artifact
+        uses: actions/upload-artifact@v4
+        with:
+          name: OpenPuck-${{ steps.build_version.outputs.artifact_version }}-standard.uf2
+          retention-days: 7
+          if-no-files-found: error
+          path: build/openpuck/OpenPuck.ino.uf2
+
+      - name: Upload OpenPuck HEX artifact
+        uses: actions/upload-artifact@v4
+        with:
+          name: OpenPuck-${{ steps.build_version.outputs.artifact_version }}-standard.hex
+          retention-days: 7
+          if-no-files-found: error
+          path: build/openpuck/OpenPuck.ino.hex
+
+      - name: Upload ReversePuckFirmware UF2 artifact
+        uses: actions/upload-artifact@v4
+        with:
+          name: ReversePuckFirmware-${{ steps.build_version.outputs.artifact_version }}.uf2
+          retention-days: 7
+          if-no-files-found: error
+          path: build/reversepuck/ReversePuckFirmware.ino.uf2
+
+      - name: Upload ReversePuckFirmware HEX artifact
         uses: actions/upload-artifact@v4
         with:
-          name: openpuck-firmware
+          name: ReversePuckFirmware-${{ steps.build_version.outputs.artifact_version }}.hex
           retention-days: 7
-          path: |
-            build/artifacts/*
+          if-no-files-found: error
+          path: build/reversepuck/ReversePuckFirmware.ino.hex

+ 2 - 3
.github/workflows/release.yml

@@ -157,7 +157,7 @@ jobs:
 
           find build/openpuck build/openpuck-recovery \
             -maxdepth 1 -type f \
-            \( -name '*.uf2' -o -name '*.hex' -o -name '*.zip' \) \
+            \( -name '*.uf2' -o -name '*.hex' \) \
             -print | while read -r f; do
             # Keep only the extension; the arduino base name (OpenPuck.ino.*)
             # is redundant once we prefix with OpenPuck-<version>-<flavor>.
@@ -173,7 +173,7 @@ jobs:
 
           find build/reversepuck \
             -maxdepth 1 -type f \
-            \( -name '*.uf2' -o -name '*.hex' -o -name '*.zip' \) \
+            \( -name '*.uf2' -o -name '*.hex' \) \
             -print | while read -r f; do
             ext="${f##*.}"
             cp "$f" "release_assets/ReversePuckFirmware-${VERSION}.${ext}"
@@ -199,7 +199,6 @@ jobs:
             - `OpenPuck-*-standard.*` — puck firmware (standard)
             - `OpenPuck-*-factory-reset.*` — puck firmware (factory reset)
             - `ReversePuckFirmware-*.*` — reverse-puck firmware (controller emulator)
-            - `.zip` files for Adafruit DFU tool
             - `.uf2` files for drag-and-drop flashing (BOOT/UF2 drive)
             - `.hex` files for direct flashing workflows
         env: