Files
lwbtn/.github/workflows/release.yml
T
2026-06-01 19:50:30 +02:00

55 lines
1.4 KiB
YAML

name: Create Release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
# Explicitly grant permission to create/write releases
permissions:
contents: write
steps:
# Step 1: Check out the repository code
# Fetch the full history to compare between tags
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
# Generate the release
- name: Generate and Publish Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
generate_release_notes: true
draft: false
prerelease: false
# Publish package to PlatformIO
publish-platformio:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install PlatformIO
run: pip install platformio
- name: Publish to PlatformIO
env:
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}
run: pio pkg publish --type library --non-interactive