Xteink-X4-crosspoint-reader/.github/workflows/release.yml
Andrew Brandt 0589664924
ci: implement semantic release workflow
**Description**:

Implement semantic release workflow.

Signed-off-by: Andrew Brandt <brandt.andrew89@gmail.com>
2026-01-19 08:59:32 -06:00

64 lines
1.7 KiB
YAML

name: Compile Release
on:
workflow_dispatch:
inputs:
dry-run-enabled:
description: 'Run in dry-run mode (no real release)'
required: true
default: true
type: boolean
jobs:
build-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: actions/cache@v5
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v6
with:
python-version: '3.14'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Build CrossPoint
run: pio run -e gh_release
- name: Upload Artifacts (for semantic-release assets)
uses: actions/upload-artifact@v4
with:
name: CrossPoint-artifacts
path: |
.pio/build/gh_release/bootloader.bin
.pio/build/gh_release/firmware.bin
.pio/build/gh_release/firmware.elf
.pio/build/gh_release/firmware.map
.pio/build/gh_release/partitions.bin
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Semantic Release
run: npm install -g semantic-release@24.2.4 @semantic-release/exec@7.1.0 conventional-changelog-conventionalcommits@8.0.0
- name: Run semantic-release (dry run if requested)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
FLAGS=""
if [[ "${{ inputs.dry-run-enabled }}" == "true" ]]; then
FLAGS="--dry-run"
fi
npx semantic-release ${FLAGS}