Skip to content

Prepare Release

Prepare Release #11

name: Prepare Release
on:
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: write
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: Build PlatformIO Project
run: pio run
- name: Get Versions
id: versions
run: |
VERSION_NUMBER=$(awk -F'"' '/#define VERSION_NUMBER/ {print $2}' ./src/Main.h)
echo "VERSION_NUMBER=${VERSION_NUMBER}" >> $GITHUB_ENV
- name: Temporary Copy for old version update
run: |
find .pio/build -type f -name 'W*.bin' -exec bash -c '
for file; do
new_file="${file/W/Wireless}"
cp "$file" "$new_file"
done
' bash {} +
- name: Create Draft Release
uses: softprops/action-gh-release@v2
with:
draft: true
tag_name: "${{ env.VERSION_NUMBER }}"
generate_release_notes: true
files: .pio/build/**/*.bin