Skip to content

Merge develop into main for v0.4.1 release #9

Merge develop into main for v0.4.1 release

Merge develop into main for v0.4.1 release #9

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- platform: windows
os: windows-latest
artifact: open-wemo-*-win.exe
- platform: mac
os: macos-latest
artifact: open-wemo-*-mac
- platform: mac-intel
os: macos-latest # Cross-compile from ARM runner
artifact: open-wemo-*-mac-intel
- platform: linux
os: ubuntu-latest
artifact: open-wemo-*-linux
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Build
run: bun scripts/build.ts ${{ matrix.platform }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}
path: packages/bridge/dist/${{ matrix.artifact }}
if-no-files-found: error
release:
name: Create Release
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Need full history for changelog
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: List artifacts
run: |
echo "Downloaded artifacts:"
find artifacts -type f
- name: Generate changelog
id: changelog
run: |
# Get the previous tag
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
if [ -z "$PREV_TAG" ]; then
echo "First release - no previous tag"
CHANGELOG="Initial release"
else
echo "Generating changelog from $PREV_TAG to ${{ github.ref_name }}"
CHANGELOG=$(git log ${PREV_TAG}..HEAD --pretty=format:"- %s" --no-merges)
fi
# Write to file for multiline support
echo "$CHANGELOG" > changelog.txt
echo "changelog_file=changelog.txt" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v2
with:
name: Open Wemo ${{ github.ref_name }}
body_path: changelog.txt
draft: false
prerelease: ${{ contains(github.ref_name, '-') }}
files: |
artifacts/windows/*
artifacts/mac/*
artifacts/mac-intel/*
artifacts/linux/*
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}