Skip to content

Update Publish.yaml #16

Update Publish.yaml

Update Publish.yaml #16

Workflow file for this run

name: Build and Release PlatformIO Project
on:
push:
branches:
- main
jobs:
build:
runs-on: self-hosted
strategy:
matrix:
board: [esp32_s2, esp32_wroom, esp32_c3]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Necessary to fetch all tags and history
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install PlatformIO
run: pip install platformio
- name: Build with PlatformIO
run: platformio run --environment ${{ matrix.board }}
- name: Tar artifacts
run: tar -czvf ${{ matrix.board }}.tar.gz -C .pio/build/${{ matrix.board }} firmware.bin partitions.bin bootloader.bin
- name: Delete existing tag
run: |
git tag -d release || true
git push origin :refs/tags/release || true
- name: Create new tag
run: |
git tag release
git push origin release
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: |
./${{ matrix.board }}.tar.gz
draft: false
tag_name: release
name: Ghost ESP Release
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}