Skip to content

Create Release

Create Release #15

Workflow file for this run

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 Release
runs-on: ubuntu-latest
steps:
- name: Get version from tag
id: tag_name
run: |
echo "current_version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
shell: bash
- name: Checkout code
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and run Dev Container task
uses: devcontainers/ci@v0.3
with:
# Change this to point to your image name
imageName: ghcr.io/${{ github.repository_owner }}/ebbflowcontrol-devcontainer
# Change this to be your CI task/script
runCmd: |
./build_all.sh
- name: Zip factory build files
run: |
# Extract filenames from flash_project_args (keeping paths)
FILES_TO_ZIP=$(awk 'NR > 1 {print "./build_factory/"$2}' ./build_factory/flash_project_args | tr '\n' ' ')
# Add additional files
FILES_TO_ZIP="$FILES_TO_ZIP EbbFlowControl-Setup_wifi_qr.png EbbFlowControl-Setup_connection_url_qr.png ./build_factory/flash_project_args"
echo "Files to zip: $FILES_TO_ZIP"
zip FactoryBuildFiles.zip $FILES_TO_ZIP
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
validation_level: warn
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.changelog_reader.outputs.version }}
name: Release ${{ steps.changelog_reader.outputs.version }}
body: ${{ steps.changelog_reader.outputs.changes }}
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
token: ${{ secrets.GITHUB_TOKEN }}
files: |
./build_app/EbbFlowControl.bin
FactoryBuildFiles.zip