Skip to content

chore: build script better cache #14

chore: build script better cache

chore: build script better cache #14

name: PlatformIO CI
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
./proj/.pio
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio-new2
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Build PlatformIO Project
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: bash ./build.sh
working-directory: ./proj
- name: Read version
if: ${{ env.SKIP_BUILD != '1' }}
run: echo "VERSION=$(head -c 8 ./proj/.versum)" >> $GITHUB_ENV
- uses: ncipollo/release-action@v1
if: ${{ env.SKIP_BUILD != '1' }}
with:
artifacts: "./proj/build/*.bin"
generateReleaseNotes: true
skipIfReleaseExists: true
makeLatest: true
tag: ${{ env.VERSION }}
token: ${{ secrets.GH_TOKEN }}