Release v1.21.0-dev #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Build | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Cache PlatformIO | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.platformio | |
| .pio | |
| key: ${{ runner.os }}-pio-${{ hashFiles('platformio.ini') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pio- | |
| - name: Install PlatformIO | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install platformio | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Prepare default config | |
| run: | | |
| bash tools/prepare_config.sh | |
| - name: Build web assets | |
| run: | | |
| cd web | |
| npm install | |
| npm run build | |
| cd .. | |
| python scripts/web_to_header.py web/dist -o lib/WebService/generated/web_files.h | |
| - name: Build firmware | |
| run: | | |
| pio run -e geiger | |
| - name: Package binaries | |
| run: | | |
| # Extract version from tag (e.g. refs/tags/v1.20.0 -> v1.20.0) | |
| VERSION=${GITHUB_REF#refs/tags/} | |
| echo "📦 Packaging firmware for version: $VERSION" | |
| mkdir -p binaries/geiger | |
| cp .pio/build/geiger/firmware.bin binaries/geiger/multigeiger-${VERSION}.bin || true | |
| cp .pio/build/geiger/firmware.elf binaries/geiger/multigeiger-${VERSION}.elf || true | |
| echo "✅ Packaged files:" | |
| ls -lh binaries/geiger | |
| - name: Publish release assets | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: | | |
| binaries/geiger/* |