From 08a90dd17799153ea4a8774dee9ac2eb422b957c Mon Sep 17 00:00:00 2001 From: Aria00pp <123830753+Aria00pp@users.noreply.github.com> Date: Mon, 1 Jun 2026 18:24:34 +0330 Subject: [PATCH] Add manual release build workflow --- .github/workflows/release-build.yml | 139 ++++++++++++++++++++++++++++ .gitignore | 1 + release/BUILD_VERIFICATION.md | 25 ++++- release/candidates/RC-0.1.md | 4 + 4 files changed, 167 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release-build.yml diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml new file mode 100644 index 0000000..941d1f2 --- /dev/null +++ b/.github/workflows/release-build.yml @@ -0,0 +1,139 @@ +name: Release Build + +on: + workflow_dispatch: + +jobs: + windows-exe: + name: Build Windows EXE + runs-on: windows-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install Windows packaging dependencies + run: py -m pip install --upgrade pyinstaller pyserial + + - name: Build Windows EXE + run: powershell -ExecutionPolicy Bypass -File .\release\scripts\build_windows_exe.ps1 + + - name: Verify Windows EXE artifact + shell: pwsh + run: | + $exe = 'release\artifacts\windows\PortableAVRControlStudio.exe' + if (-not (Test-Path $exe -PathType Leaf)) { + throw "Expected EXE artifact was not created: $exe" + } + Get-Item $exe | Select-Object FullName,Length,LastWriteTime + + - name: Upload Windows EXE artifact + uses: actions/upload-artifact@v4 + with: + name: portable-avr-control-studio-windows-exe + path: release/artifacts/windows/PortableAVRControlStudio.exe + if-no-files-found: error + + uno-firmware-hex: + name: Build Arduino Uno HEX + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Install Arduino CLI + uses: arduino/setup-arduino-cli@v2 + + - name: Install Arduino AVR core + run: | + arduino-cli core update-index + arduino-cli core install arduino:avr + + - name: Build Arduino Uno firmware HEX + run: bash release/scripts/build_uno_firmware_hex.sh + + - name: Verify Arduino Uno HEX artifact + run: | + set -euo pipefail + test -f release/artifacts/firmware/PortableAVRControlStudio.ino.hex + ls -la release/artifacts/firmware + + - name: Upload Arduino Uno firmware artifacts + uses: actions/upload-artifact@v4 + with: + name: portable-avr-control-studio-uno-firmware + path: release/artifacts/firmware/* + if-no-files-found: error + + customer-package: + name: Assemble customer package + runs-on: ubuntu-latest + needs: + - windows-exe + - uno-firmware-hex + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Download Windows EXE artifact + uses: actions/download-artifact@v4 + with: + name: portable-avr-control-studio-windows-exe + path: release/artifacts/windows + + - name: Download Arduino Uno firmware artifacts + uses: actions/download-artifact@v4 + with: + name: portable-avr-control-studio-uno-firmware + path: release/artifacts/firmware + + - name: Verify release package inputs + run: | + set -euo pipefail + test -f release/artifacts/windows/PortableAVRControlStudio.exe + test -f release/artifacts/firmware/PortableAVRControlStudio.ino.hex + + - name: Assemble customer ZIP + run: python release/scripts/assemble_customer_package.py + + - name: Verify customer ZIP artifact + run: | + set -euo pipefail + test -f release/customer_package/PortableAVRControlStudio-customer-handoff.zip + ls -la release/customer_package + + - name: Generate SHA-256 checksums + run: | + set -euo pipefail + mkdir -p release/artifacts/checksums + sha256sum \ + release/artifacts/windows/PortableAVRControlStudio.exe \ + release/artifacts/firmware/PortableAVRControlStudio.ino.hex \ + release/customer_package/PortableAVRControlStudio-customer-handoff.zip \ + > release/artifacts/checksums/SHA256SUMS.txt + cat release/artifacts/checksums/SHA256SUMS.txt + + - name: Upload customer ZIP artifact + uses: actions/upload-artifact@v4 + with: + name: portable-avr-control-studio-customer-package + path: | + release/customer_package/PortableAVRControlStudio-customer-handoff.zip + release/artifacts/checksums/SHA256SUMS.txt + if-no-files-found: error + + - name: Upload checksum artifact + uses: actions/upload-artifact@v4 + with: + name: portable-avr-control-studio-sha256-checksums + path: release/artifacts/checksums/SHA256SUMS.txt + if-no-files-found: error diff --git a/.gitignore b/.gitignore index 8d25817..8d0dd61 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ dist/ *.spec release/artifacts/windows/* release/artifacts/firmware/* +release/artifacts/checksums/* release/customer_package/* !release/artifacts/windows/.gitkeep !release/artifacts/firmware/.gitkeep diff --git a/release/BUILD_VERIFICATION.md b/release/BUILD_VERIFICATION.md index 0f310e7..625e5fe 100644 --- a/release/BUILD_VERIFICATION.md +++ b/release/BUILD_VERIFICATION.md @@ -18,6 +18,26 @@ These are software build checks only. They do not prove operation on physical Ar - Internet access or a configured Arduino CLI package cache for the `arduino:avr` core. - Bash-compatible shell for `release/scripts/build_uno_firmware_hex.sh`. +## Manual GitHub Actions release build workflow + +A maintainer may produce software build artifacts with the manual GitHub Actions workflow at `.github/workflows/release-build.yml`. The workflow is intentionally `workflow_dispatch` only; it does not run automatically on push or pull request. + +To run it from GitHub: + +1. Open the repository **Actions** tab. +2. Select **Release Build**. +3. Choose **Run workflow** on the desired branch or commit. +4. Wait for the Windows EXE, Arduino Uno HEX, and customer package jobs to complete. + +The workflow publishes downloadable GitHub Actions artifacts from the completed run: + +- `portable-avr-control-studio-windows-exe` containing `PortableAVRControlStudio.exe`. +- `portable-avr-control-studio-uno-firmware` containing `PortableAVRControlStudio.ino.hex` and any related Arduino CLI firmware output files. +- `portable-avr-control-studio-customer-package` containing `PortableAVRControlStudio-customer-handoff.zip` and `SHA256SUMS.txt`. +- `portable-avr-control-studio-sha256-checksums` containing `SHA256SUMS.txt` for the EXE, HEX, and ZIP. + +Download these from the workflow run summary page under **Artifacts**. Treat them as software build evidence only. The workflow compiles and packages files for the Arduino Uno / ATmega328P AVR target, but it does not validate operation on physical Arduino Uno hardware, connected loads, sensors, wiring, power, or enclosure. + ## 1. Optional clean start Generated build outputs are ignored by git. To start from a clean artifact area, remove generated files while keeping the tracked `.gitkeep` placeholders: @@ -25,6 +45,7 @@ Generated build outputs are ignored by git. To start from a clean artifact area, ```bash find release/artifacts/windows -mindepth 1 ! -name .gitkeep -delete find release/artifacts/firmware -mindepth 1 ! -name .gitkeep -delete +find release/artifacts/checksums -mindepth 1 ! -name .gitkeep -delete 2>/dev/null || true find release/customer_package -mindepth 1 ! -name .gitkeep -delete ``` @@ -147,8 +168,8 @@ git status --short --ignored release/artifacts release/customer_package Expected behavior: - Tracked `.gitkeep` files may appear only if intentionally changed. -- Generated files under `release/artifacts/windows/`, `release/artifacts/firmware/`, and `release/customer_package/` should be ignored. -- Do not commit generated `.exe`, `.hex`, or `.zip` artifacts. +- Generated files under `release/artifacts/windows/`, `release/artifacts/firmware/`, `release/artifacts/checksums/`, and `release/customer_package/` should be ignored. +- Do not commit generated `.exe`, `.hex`, `.zip`, or checksum artifacts. ## 6. Release-claim boundaries diff --git a/release/candidates/RC-0.1.md b/release/candidates/RC-0.1.md index 56115d1..ac7511e 100644 --- a/release/candidates/RC-0.1.md +++ b/release/candidates/RC-0.1.md @@ -12,6 +12,10 @@ - **Physical hardware validation status:** Not performed unless evidence is later attached - **Upload status:** Prepared artifact only; no validated one-click production uploader +## Manual release-build workflow note + +RC-0.1 software artifacts may be produced by the manual GitHub Actions **Release Build** workflow. Maintainers still need to fill the status fields and evidence entries with the selected source commit, workflow run results, artifact inventory, SHA-256 checksums, and any separately supplied physical hardware validation evidence. + ## Maintainer action checklist Complete this checklist before sending the RC-0.1 customer ZIP.