Release v1.2.10 #24
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: Compile Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Compile release builds" | |
| required: true | |
| type: string | |
| push: | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Verify release tag is on main | |
| if: github.event_name == 'push' | |
| run: | | |
| git fetch origin main:refs/remotes/origin/main | |
| TAG_COMMIT="$(git rev-list -n 1 "$GITHUB_REF_NAME")" | |
| git merge-base --is-ancestor "$TAG_COMMIT" origin/main | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| enable-cache: true | |
| - name: Cache PlatformIO packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.platformio | |
| key: ${{ runner.os }}-platformio-${{ hashFiles('platformio.ini', 'platformio.local.example.ini') }} | |
| restore-keys: | | |
| ${{ runner.os }}-platformio- | |
| - name: Install PlatformIO Core | |
| run: uv pip install --system -U https://github.com/pioarduino/platformio-core/archive/refs/tags/v6.1.19.zip | |
| - name: Resolve release version | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| VERSION="${{ inputs.version }}" | |
| else | |
| VERSION="${GITHUB_REF_NAME#v}" | |
| fi | |
| VERSION="${VERSION#v}" | |
| echo "RELEASE_VERSION=$VERSION" >> "$GITHUB_ENV" | |
| sed -i "s/crossink_version = .*/crossink_version = $VERSION/" platformio.ini | |
| - name: Build CrossPoint | |
| env: | |
| CROSSPOINT_RELEASE_VERSION: ${{ env.RELEASE_VERSION }} | |
| run: pio run -e tiny -e xlarge -e no_emoji | |
| - name: Generate release catalog | |
| run: | | |
| python3 scripts/generate_release_catalog.py \ | |
| --version "${{ env.RELEASE_VERSION }}" \ | |
| --repo "${{ github.repository }}" \ | |
| --firmware ".pio/build/tiny/firmware-tiny-v${{ env.RELEASE_VERSION }}.bin" \ | |
| --firmware ".pio/build/xlarge/firmware-xlarge-v${{ env.RELEASE_VERSION }}.bin" \ | |
| --firmware ".pio/build/no_emoji/firmware-no_emoji-v${{ env.RELEASE_VERSION }}.bin" \ | |
| --output ".pio/build/catalog" | |
| - name: Publish catalog to GitHub Pages source | |
| env: | |
| DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | |
| run: | | |
| git config user.name "uxjulia" | |
| git config user.email "julia@uxj.io" | |
| git fetch origin "$DEFAULT_BRANCH" | |
| git worktree add ../crossink-pages "origin/$DEFAULT_BRANCH" | |
| cp ".pio/build/catalog" "../crossink-pages/docs/catalog" | |
| cd ../crossink-pages | |
| if git diff --quiet -- docs/catalog; then | |
| echo "docs/catalog is already current" | |
| exit 0 | |
| fi | |
| git add docs/catalog | |
| git commit -m "Update release catalog for v${RELEASE_VERSION}" | |
| git push origin "HEAD:$DEFAULT_BRANCH" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| token: ${{ secrets.RELEASE_PAT }} | |
| tag_name: v${{ env.RELEASE_VERSION }} | |
| target_commitish: ${{ github.sha }} | |
| draft: true | |
| files: | | |
| .pio/build/tiny/firmware-tiny-v${{ env.RELEASE_VERSION }}.bin | |
| .pio/build/xlarge/firmware-xlarge-v${{ env.RELEASE_VERSION }}.bin | |
| .pio/build/no_emoji/firmware-no_emoji-v${{ env.RELEASE_VERSION }}.bin |