Build / macOS (macos-latest) (push) Successful in 27s
Build / macOS (macos-latest) (pull_request) Successful in 26s
Build / Linux (ubuntu-24.04) (push) Successful in 56s
Build / Linux (ubuntu-24.04) (pull_request) Successful in 54s
Build / Windows (windows-latest) (push) Successful in 4m20s
Build / Windows (windows-latest) (pull_request) Successful in 3m55s
Releases were created as drafts for one stated reason: nobody had run the plugin in the OBS GUI on any platform, so a human had to look before anything became visible. The first confirmed GUI load (Windows, OBS 32.2.2 on Windows 11, 2026-09-09) retired that gate, so `publish-release.sh` now posts `"draft": False` and the workflow no longer needs a human click. The caveats did not go away, they moved: the generated release notes now lead with what is actually confirmed (module loads and registers its source type, Windows only) and what is not (video rendering, A/V sync, latency, mid-show publisher restart, Linux and macOS in the GUI at all), and the per-platform table carries the rest. Also fixes the third and last copy of the wrong Windows install path. The release notes template told every downloader to extract into `%APPDATA%\obs-studio\plugins\`, which on Windows is OBS's config directory and is never scanned for plugins -- that is what stopped a director's correctly-shaped install from loading. The notes now carry a per-platform table (`C:\ProgramData\obs-studio\plugins\` on Windows), the exact finished path, a warning about Explorer's "Extract All..." wrapper folder, and how to confirm the load in the OBS log. Both failure modes are silent, which is precisely why they belong in the notes. Note the tradeoff now that nothing is held back: assets upload after the release row is created, so a release is briefly visible with no files attached. Called out in the script header. Verified by rendering the heredoc with a stub tag: backslash escaping survives into correct markdown, and the YAML parses. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AzGnvQ6wfD7bw7PZN35ft9
230 lines
8.7 KiB
YAML
230 lines
8.7 KiB
YAML
name: Release
|
|
|
|
# Packages a build of each platform into a downloadable archive and creates
|
|
# a published Gitea Release for it, so the project owner and other directors
|
|
# can grab a ready-to-use build instead of compiling from source.
|
|
#
|
|
# Runs only on a pushed version tag (see `on.push.tags` below) -- never on an
|
|
# ordinary push or PR, unlike build.yml. The release it creates is PUBLISHED
|
|
# immediately. It used to be a draft, gated on a human clicking Publish
|
|
# because nobody had run the plugin in the OBS GUI on any platform; the first
|
|
# confirmed GUI load (Windows, 2026-09-09) retired that. The caveats that
|
|
# remain live in the generated release notes, not in the draft flag -- see
|
|
# .gitea/scripts/publish-release.sh.
|
|
#
|
|
# The actual per-platform build commands live in .gitea/scripts/ and are the
|
|
# same scripts .gitea/workflows/build.yml uses, so this workflow can't drift
|
|
# from what CI already builds and verifies on every push.
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
linux:
|
|
name: Linux (ubuntu-24.04)
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install build dependencies
|
|
run: .gitea/scripts/linux-deps.sh
|
|
|
|
- name: Configure, build, test, verify
|
|
run: .gitea/scripts/linux-build.sh
|
|
|
|
- name: Package archive
|
|
run: |
|
|
set -euo pipefail
|
|
# zip is not guaranteed present on a minimal self-hosted runner
|
|
# image (unlike GitHub-hosted ubuntu-24.04, which build.yml's
|
|
# deps script doesn't need to care about).
|
|
command -v zip >/dev/null || sudo apt-get install -y -qq zip
|
|
out="streamer-tools-camera-${GITEA_REF_NAME}-linux-x64.zip"
|
|
root="$(pwd)"
|
|
|
|
# Wrap build/package/'s bin/+data/ inside a top-level
|
|
# streamer-tools-camera/ directory, matching the plugin directory
|
|
# name OBS itself expects under <config>/obs-studio/plugins/ (see
|
|
# obs-adapter/CMakeLists.txt's staging comment). This makes the
|
|
# archive a straight `unzip -d ~/.config/obs-studio/plugins/`
|
|
# drop-in -- no manual `cp -r bin data` step required.
|
|
stage="$(mktemp -d)"
|
|
mkdir -p "${stage}/streamer-tools-camera"
|
|
cp -r build/package/. "${stage}/streamer-tools-camera/"
|
|
( cd "${stage}" && zip -r "${root}/${out}" streamer-tools-camera )
|
|
rm -rf "${stage}"
|
|
|
|
mkdir -p dist
|
|
mv "${out}" "dist/${out}"
|
|
ls -la dist
|
|
env:
|
|
GITEA_REF_NAME: ${{ github.ref_name }}
|
|
|
|
- name: Upload archive
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: release-archive-linux-x64
|
|
path: dist
|
|
|
|
macos:
|
|
name: macOS (macos-latest)
|
|
runs-on: macos-latest
|
|
outputs:
|
|
bundle_found: ${{ steps.package.outputs.bundle_found }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install build dependencies
|
|
run: .gitea/scripts/macos-deps.sh
|
|
|
|
- name: Configure, build, test, verify
|
|
run: .gitea/scripts/macos-build.sh
|
|
|
|
- name: Package archive
|
|
id: package
|
|
run: |
|
|
set -euo pipefail
|
|
out="streamer-tools-camera-${GITEA_REF_NAME}-macos.zip"
|
|
root="$(pwd)"
|
|
mkdir -p dist
|
|
|
|
# Look for a *.plugin bundle rather than assuming its exact final
|
|
# location, falling back to packaging build/package/ as-is (a
|
|
# bare .so, not a loadable bundle) only if the bundle step didn't
|
|
# run or produced nothing -- see the macOS packaging gap in
|
|
# README.md for when that fallback path is actually live. The
|
|
# bundle itself is zipped at the archive's top level (cd into its
|
|
# parent, zip just the bundle dir) so the archive is already a
|
|
# straight `unzip -d ~/Library/Application\ Support/obs-studio/
|
|
# plugins/` drop-in -- no wrapping needed here, unlike
|
|
# Linux/Windows above, because OBS wants the whole *.plugin
|
|
# bundle directly under plugins/, not nested under a named
|
|
# subdirectory.
|
|
bundle="$(find build -maxdepth 4 -type d -name '*.plugin' 2>/dev/null | head -n1 || true)"
|
|
if [ -n "${bundle}" ]; then
|
|
echo "Found macOS .plugin bundle: ${bundle}"
|
|
( cd "$(dirname "${bundle}")" && zip -r "${root}/${out}" "$(basename "${bundle}")" )
|
|
echo "bundle_found=true" >> "${GITHUB_OUTPUT}"
|
|
else
|
|
echo "::warning::No .plugin bundle found under build/ -- packaging build/package/ as-is. This is NOT yet a loadable OBS.app plugin; see the macOS packaging gap in README.md."
|
|
( cd build/package && zip -r "${root}/${out}" . )
|
|
echo "bundle_found=false" >> "${GITHUB_OUTPUT}"
|
|
fi
|
|
|
|
mv "${out}" "dist/${out}"
|
|
ls -la dist
|
|
env:
|
|
GITEA_REF_NAME: ${{ github.ref_name }}
|
|
|
|
- name: Upload archive
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: release-archive-macos
|
|
path: dist
|
|
|
|
windows:
|
|
name: Windows (windows-latest)
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Verify build dependencies
|
|
# See build.yml's Windows job for why this is no longer
|
|
# lukka/get-cmake@latest -- CMake and Ninja are installed once,
|
|
# directly on winvm-builder's system PATH; this just fails loudly
|
|
# if that ever stops being true.
|
|
shell: powershell
|
|
run: |
|
|
$ErrorActionPreference = "Stop"
|
|
cmake --version
|
|
ninja --version
|
|
|
|
- name: Configure, build, test, verify
|
|
# Windows PowerShell (powershell.exe), not PowerShell Core (pwsh) --
|
|
# this self-hosted runner does not have pwsh installed. See the same
|
|
# note in build.yml.
|
|
shell: powershell
|
|
run: ./.gitea/scripts/windows-build.ps1
|
|
|
|
- name: Package archive
|
|
shell: powershell
|
|
run: |
|
|
$ErrorActionPreference = "Stop"
|
|
$out = "streamer-tools-camera-$env:GITEA_REF_NAME-windows-x64.zip"
|
|
New-Item -ItemType Directory -Force -Path dist | Out-Null
|
|
|
|
# Wrap build\package\'s bin\+data\ inside a top-level
|
|
# streamer-tools-camera\ directory, matching the plugin directory
|
|
# name OBS itself expects under %APPDATA%\obs-studio\plugins\ (see
|
|
# obs-adapter/CMakeLists.txt's staging comment). This makes the
|
|
# archive a straight `Expand-Archive -DestinationPath
|
|
# $env:APPDATA\obs-studio\plugins\` drop-in -- no manual copy step
|
|
# required. Compress-Archive includes the source folder's own name
|
|
# as the archive root when given a single directory path, so
|
|
# staging under a streamer-tools-camera\ dir is enough on its own.
|
|
$stage = Join-Path $env:TEMP "stplugin-stage-$([guid]::NewGuid())"
|
|
$pluginDir = Join-Path $stage "streamer-tools-camera"
|
|
New-Item -ItemType Directory -Force -Path $pluginDir | Out-Null
|
|
Copy-Item -Path build\package\* -Destination $pluginDir -Recurse
|
|
Compress-Archive -Path $pluginDir -DestinationPath "dist\$out" -Force
|
|
Remove-Item -Recurse -Force $stage
|
|
|
|
Get-ChildItem dist
|
|
env:
|
|
GITEA_REF_NAME: ${{ github.ref_name }}
|
|
|
|
- name: Upload archive
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: release-archive-windows-x64
|
|
path: dist
|
|
|
|
release:
|
|
name: Create Gitea Release
|
|
needs: [linux, macos, windows]
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout
|
|
# Not strictly needed to build anything here, but publish-release.sh
|
|
# lives in the repo and this keeps the release job self-contained /
|
|
# easy to reason about rather than reaching into another job's
|
|
# checkout.
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Download Linux archive
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: release-archive-linux-x64
|
|
path: dist
|
|
|
|
- name: Download macOS archive
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: release-archive-macos
|
|
path: dist
|
|
|
|
- name: Download Windows archive
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: release-archive-windows-x64
|
|
path: dist
|
|
|
|
- name: Create release and upload assets
|
|
run: .gitea/scripts/publish-release.sh
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
SERVER: https://repo.anhonesthost.net
|
|
OWNER: CyberCoveLLC
|
|
REPO: obs-streamer-tools-plugin
|
|
TAG: ${{ github.ref_name }}
|
|
SHA: ${{ github.sha }}
|
|
DIST_DIR: dist
|
|
MACOS_BUNDLE_FOUND: ${{ needs.macos.outputs.bundle_found }}
|