Skip to content

Update version_inc.py - prepare automatic versioning with chain #29

Update version_inc.py - prepare automatic versioning with chain

Update version_inc.py - prepare automatic versioning with chain #29

Workflow file for this run

name: PlatformIO CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: write temp file with build number and set to env variable
run: |
touch ${{ github.workspace }}/include/buildnumber.txt
printf -v BUILDNUMBER "%04ddev" ${{github.run_number}}
echo $BUILDNUMBER >> ${{ github.workspace }}/include/buildnumber.txt
echo "cat ../buildnumber.txt"
cat ${{ github.workspace }}/include/buildnumber.txt
echo "CURRENT_BUILDNUMBER=$BUILDNUMBER" >> $GITHUB_ENV
- name: Build PlatformIO Project
run: pio run
- name: changing firmware name after building
run: |
mv .pio/build/esp12e/firmware.bin .pio/build/esp12e/dtuGateway_snapshot_${{github.run_number}}.bin
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
path: .pio/build/esp12e/dtuGateway_snapshot_${{github.run_number}}.bin
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "snapshot"
prerelease: true
title: "Latest snapshot"
files: |
.pio/build/esp12e/dtuGateway_snapshot_${{github.run_number}}.bin
include/version.json