diff --git a/.github/workflows/release_candidate.yml b/.github/workflows/release_candidate.yml new file mode 100644 index 00000000..8f704484 --- /dev/null +++ b/.github/workflows/release_candidate.yml @@ -0,0 +1,48 @@ +name: Compile Release Candidate + +on: + pull_request: + +jobs: + build-release-candidate: + if: startsWith(github.head_ref, '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: Extract env + run: | + echo "SHORT_SHA=${GITHUB_SHA::6}" >> $GITHUB_ENV + echo "BRANCH_SUFFIX=${GITHUB_REF_NAME#release/}" >> $GITHUB_ENV + + - name: Build CrossPoint Release Candidate + env: + CROSSPOINT_RC_HASH: ${{ env.SHORT_SHA }} + run: pio run -e gh_release_rc + + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: CrossPoint-RC-${{ env.BRANCH_SUFFIX }} + path: | + .pio/build/gh_release_rc/bootloader.bin + .pio/build/gh_release_rc/firmware.bin + .pio/build/gh_release_rc/firmware.elf + .pio/build/gh_release_rc/firmware.map + .pio/build/gh_release_rc/partitions.bin diff --git a/platformio.ini b/platformio.ini index e8574470..c4b992e8 100644 --- a/platformio.ini +++ b/platformio.ini @@ -2,7 +2,7 @@ default_envs = default [crosspoint] -version = 0.16.0 +version = 1.0.0 [base] platform = espressif32 @ 6.12.0 @@ -60,3 +60,9 @@ extends = base build_flags = ${base.build_flags} -DCROSSPOINT_VERSION=\"${crosspoint.version}\" + +[env:gh_release_rc] +extends = base +build_flags = + ${base.build_flags} + -DCROSSPOINT_VERSION=\"${crosspoint.version}-rc-${sysenv.CROSSPOINT_RC_HASH}\"