ci: add tag-triggered release packaging workflow
Adds .gitea/workflows/release.yml, triggered only on a pushed v* tag, which builds all three platforms (reusing the exact same configure/build/test commands as build.yml, now factored out into .gitea/scripts/ so the two workflows can't drift), zips each platform's build/package/ output, and creates a draft Gitea Release with the archives attached. This is packaging automation only -- it does not resolve or bypass the C1 WebRTC/OpenH264 release gate documented in README.md's Status section. Nothing publishes until a human deliberately pushes a version tag (which should not happen before owner sign-off) and then explicitly publishes the resulting draft. The generated release notes lead with a restatement of the open C1 question specifically so that second step can't be taken by accident. build.yml is refactored (not rewritten) to call the same shared scripts; its job/step behavior is otherwise unchanged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RL8abRmgFXkVASHkkqiJbE
This commit is contained in:
@@ -0,0 +1,196 @@
|
||||
name: Release
|
||||
|
||||
# Packages a build of each platform into a downloadable archive and creates
|
||||
# a (draft) Gitea Release for it, so the project owner and other directors
|
||||
# can grab a ready-to-use build instead of compiling from source.
|
||||
#
|
||||
# RELEASE GATE -- READ BEFORE TAGGING
|
||||
# ------------------------------------------------------------------
|
||||
# This workflow runs ONLY on a pushed version tag (see `on.push.tags` below)
|
||||
# -- it never runs on an ordinary push or PR, unlike build.yml. Pushing a
|
||||
# tag is therefore the one deliberate human act that starts it, and the
|
||||
# release it creates is a DRAFT: it stays invisible to anyone without write
|
||||
# access until a human explicitly opens it and clicks Publish. That is a
|
||||
# second deliberate act past the tag push.
|
||||
#
|
||||
# Both of those are process, not a legal opinion. The actual open question --
|
||||
# whether this plugin's bundled WebRTC/OpenH264 code (via LiveKit) can be
|
||||
# redistributed as a public download at all -- is tracked as "C1" in the
|
||||
# README's `## Status` section and in third_party/livekit/README.md, and it
|
||||
# is NOT resolved. Nothing here resolves it; the generated release notes put
|
||||
# a reminder of that fact at the top of every release this workflow creates,
|
||||
# specifically so nobody publishes a draft without seeing it again first.
|
||||
# (The separate GPLv2/Apache-2.0 question, "C2", *is* resolved -- see
|
||||
# README.)
|
||||
#
|
||||
# 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)"
|
||||
( cd build/package && zip -r "${root}/${out}" . )
|
||||
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
|
||||
|
||||
# macOS packaging is being fixed separately (see the "macOS
|
||||
# packaging gap" in README.md). Once it lands, build/package/ (or
|
||||
# wherever that work stages its output) should contain a
|
||||
# `<name>.plugin` bundle directory -- look for one rather than
|
||||
# assuming its exact final location, and fall back to packaging
|
||||
# build/package/ as-is (today's actual, non-bundle output) if none
|
||||
# is found yet.
|
||||
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: Install build dependencies
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
- name: Configure, build, test, verify
|
||||
shell: pwsh
|
||||
run: ./.gitea/scripts/windows-build.ps1
|
||||
|
||||
- name: Package archive
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = "Stop"
|
||||
$out = "streamer-tools-camera-$env:GITEA_REF_NAME-windows-x64.zip"
|
||||
New-Item -ItemType Directory -Force -Path dist | Out-Null
|
||||
Compress-Archive -Path build\package\* -DestinationPath "dist\$out" -Force
|
||||
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 (draft)
|
||||
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 draft 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 }}
|
||||
Reference in New Issue
Block a user