Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 139 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 23 additions & 2 deletions release/BUILD_VERIFICATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,34 @@ 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:

```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
```

Expand Down Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions release/candidates/RC-0.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading