Skip to content

PlatformIO CI

PlatformIO CI #43

Workflow file for this run

name: PlatformIO CI
on:
workflow_dispatch:
#push:
# branches: [ "main" ]
jobs:
build:
permissions:
contents: 'write'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.github_token }}
- name: Generate version
run: python utils/write-version.py
- name: Build PlatformIO Project
run: pio run -t mergebin
env:
MERGED_BIN_PATH: ./hd2_macropad.bin ${{ steps.tag_version.outputs.new_tag }}
- name: Pack assets
run: python utils/pack-assets.py
- name: Upload binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.github_token }}
file: ./hd2_macropad.bin
asset_name: hd2_macropad.bin
tag: ${{ steps.tag_version.outputs.new_tag }}
overwrite: true
prerelease: true
body: ${{ steps.tag_version.outputs.changelog }}
- name: Upload assets to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.github_token }}
file: ./assets.zip
asset_name: assets.zip
tag: ${{ steps.tag_version.outputs.new_tag }}
overwrite: true
prerelease: true
body: ${{ steps.tag_version.outputs.changelog }}