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
134 lines
5.5 KiB
Bash
Executable File
134 lines
5.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Creates a published Gitea Release for the tag that triggered
|
|
# .gitea/workflows/release.yml, and uploads every archive in $DIST_DIR as a
|
|
# release asset.
|
|
#
|
|
# This used to create a DRAFT, on the grounds that nobody had run the plugin
|
|
# in the OBS GUI on any platform. That stopped being true on 2026-09-09, when
|
|
# the v0.1.0 Windows artifact loaded into OBS 32.2.2 on Windows 11 -- so the
|
|
# release publishes directly and the per-platform table below carries the
|
|
# remaining caveats instead. Assets upload AFTER the release row is created
|
|
# either way, so a release is briefly visible with no files attached; that is
|
|
# the tradeoff for not needing a human click.
|
|
#
|
|
# Required env: GITEA_TOKEN, SERVER, OWNER, REPO, TAG, SHA, DIST_DIR
|
|
# Optional env: MACOS_BUNDLE_FOUND ("true"/"false", default "false")
|
|
set -euo pipefail
|
|
|
|
: "${GITEA_TOKEN:?}"
|
|
: "${SERVER:?}"
|
|
: "${OWNER:?}"
|
|
: "${REPO:?}"
|
|
: "${TAG:?}"
|
|
: "${SHA:?}"
|
|
: "${DIST_DIR:?}"
|
|
MACOS_BUNDLE_FOUND="${MACOS_BUNDLE_FOUND:-false}"
|
|
|
|
if [ "${MACOS_BUNDLE_FOUND}" = "true" ]; then
|
|
MACOS_NOTE="This archive contains a \`.plugin\` bundle."
|
|
else
|
|
MACOS_NOTE="This archive is packaged as a bare \`streamer-tools-camera.so\` (the layout \`build/package/\` currently produces on macOS), **not** an OBS.app-loadable \`.plugin\` bundle. It will not load in the OBS GUI as-is -- see the \"macOS packaging gap\" section of \`README.md\`."
|
|
fi
|
|
|
|
NOTES_FILE="$(mktemp)"
|
|
cat > "${NOTES_FILE}" <<EOF
|
|
# streamer-tools Camera Plugin -- ${TAG}
|
|
|
|
Built from commit \`${SHA}\`.
|
|
|
|
**Read the per-platform notes below before relying on this.** The module has
|
|
been loaded in the OBS GUI exactly once -- Windows, OBS 32.2.2 on Windows 11,
|
|
2026-09-09 -- and only "it loads and registers its source type" is confirmed
|
|
there. Whether video renders correctly, A/V sync, end-to-end latency and
|
|
mid-show publisher restart are all still unverified on every platform. See
|
|
"What is verified, and how" in \`README.md\` for exactly what is backed by
|
|
automated tests versus a human watching OBS.
|
|
|
|
| Platform | Archive | Notes |
|
|
|---|---|---|
|
|
| Linux (x64) | \`streamer-tools-camera-${TAG}-linux-x64.zip\` | Functionally complete and verified end to end against a real LiveKit server and a real libobs (see README); OBS GUI itself still unverified |
|
|
| Windows (x64) | \`streamer-tools-camera-${TAG}-windows-x64.zip\` | Built and tested by this workflow's Windows job. Confirmed to load in the OBS GUI (32.2.2 / Windows 11, 2026-09-09); nothing past module load is verified. The WinHTTP backend has never been exercised against a real streamer-tools server, only a loopback test server -- see README's Windows CI section |
|
|
| macOS | \`streamer-tools-camera-${TAG}-macos.zip\` | Built and tested by this workflow's macOS job. ${MACOS_NOTE} |
|
|
|
|
## Installing
|
|
|
|
Extract the archive into your OBS plugins folder. **The directory is not the
|
|
same shape on every platform, and picking the wrong one fails silently -- OBS
|
|
logs nothing at all for a plugin it never finds:**
|
|
|
|
| Platform | Extract into |
|
|
|---|---|
|
|
| Windows | \`C:\\ProgramData\\obs-studio\\plugins\\\` -- **not** \`%APPDATA%\\obs-studio\\\`, which is where OBS keeps its config and is never scanned for plugins |
|
|
| macOS | \`~/Library/Application Support/obs-studio/plugins/\` |
|
|
| Linux | \`~/.config/obs-studio/plugins/\` |
|
|
|
|
Each archive's top-level folder already matches the shape OBS expects, so
|
|
extracting is the whole install step -- but check the result is exactly one
|
|
folder deep. Windows Explorer's "Extract All..." adds a folder named after the
|
|
zip unless you clear it from the destination box, which nests it one level too
|
|
far and is equally silent. On Windows the finished path must be:
|
|
|
|
\`\`\`
|
|
C:\\ProgramData\\obs-studio\\plugins\\streamer-tools-camera\\bin\\64bit\\streamer-tools-camera.dll
|
|
\`\`\`
|
|
|
|
To confirm it loaded, restart OBS and check Help -> Log Files -> View Current
|
|
Log for \`streamer-tools-camera\` under "Loaded Modules". Then in OBS: Sources -> \`+\` ->
|
|
"streamer-tools Camera" -> fill in the server URL, room slug and read key
|
|
from the room's settings page -> "Refresh camera list" -> pick a camera.
|
|
|
|
## What this is
|
|
|
|
Native OBS Studio source plugin that pulls streamer-tools camera feeds
|
|
directly from LiveKit over WebRTC. See \`README.md\` in the repository for
|
|
the full design, what is and is not verified, and current CI status.
|
|
EOF
|
|
|
|
echo "----- release notes -----"
|
|
cat "${NOTES_FILE}"
|
|
echo "--------------------------"
|
|
|
|
BODY_JSON="$(python3 - "$TAG" "$NOTES_FILE" <<'PYEOF'
|
|
import json, sys
|
|
tag, notes_file = sys.argv[1], sys.argv[2]
|
|
with open(notes_file) as f:
|
|
notes = f.read()
|
|
print(json.dumps({
|
|
"tag_name": tag,
|
|
"name": tag,
|
|
"body": notes,
|
|
"draft": False,
|
|
"prerelease": False,
|
|
}))
|
|
PYEOF
|
|
)"
|
|
|
|
echo "Creating release for tag ${TAG} ..."
|
|
RESP="$(curl -sS -f -X POST \
|
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
|
-H "Content-Type: application/json" \
|
|
-d "${BODY_JSON}" \
|
|
"${SERVER}/api/v1/repos/${OWNER}/${REPO}/releases")"
|
|
|
|
RELEASE_ID="$(python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])' <<<"${RESP}")"
|
|
echo "Created release id ${RELEASE_ID} (published; assets upload next)."
|
|
|
|
shopt -s nullglob
|
|
ASSETS=("${DIST_DIR}"/*)
|
|
if [ "${#ASSETS[@]}" -eq 0 ]; then
|
|
echo "::error::no archives found in ${DIST_DIR} -- nothing to upload."
|
|
exit 1
|
|
fi
|
|
|
|
for f in "${ASSETS[@]}"; do
|
|
name="$(basename "${f}")"
|
|
echo "Uploading ${name} ..."
|
|
curl -sS -f -X POST \
|
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
|
-F "attachment=@${f}" \
|
|
"${SERVER}/api/v1/repos/${OWNER}/${REPO}/releases/${RELEASE_ID}/assets?name=${name}" \
|
|
> /dev/null
|
|
done
|
|
|
|
echo "Done. Release: ${SERVER}/${OWNER}/${REPO}/releases/${RELEASE_ID}"
|