All checks were successful
release / build-and-upload (push) Successful in 7m5s
- Rename product/host binary to streamd (drm compat copy still shipped) - Go module path streamd; STREAMD_* env aliases; agent UA streamd-agent - Panel Modules store + agent pull sync (modstore / modsync) - Rolling stable + beta download tags; README/docs channel curl blocks - Release notes in docs/releases/v0.2.0.md attached by Forgejo Actions
181 lines
7 KiB
YAML
181 lines
7 KiB
YAML
# Build multi-platform streamd (+ drm compat) binaries + Android MITM and attach them to a Forgejo release.
|
|
#
|
|
# Triggers:
|
|
# Stable: git tag v1.2.3 && git push origin v1.2.3
|
|
# Beta: git tag v1.2.3-beta.1 && git push origin v1.2.3-beta.1
|
|
#
|
|
# Each version tag gets its own release. CI also retargets a rolling channel tag:
|
|
# vX.Y.Z → release + update `stable` (always-latest download URL)
|
|
# vX.Y.Z-<pre> → prerelease + update `beta` (always-latest beta URL)
|
|
#
|
|
# Download without pinning a version:
|
|
# .../releases/download/stable/streamd-linux-amd64
|
|
# .../releases/download/beta/streamd-linux-amd64
|
|
#
|
|
# Requires a Forgejo Actions runner registered against this instance
|
|
# (label must match runs-on below — default act_runner often uses "docker").
|
|
# See deploy/forgejo/README.md § Actions / releases.
|
|
|
|
name: release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
build-and-upload:
|
|
runs-on: docker
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Classify tag (stable vs beta)
|
|
id: meta
|
|
run: |
|
|
set -euo pipefail
|
|
TAG="${{ github.ref_name }}"
|
|
# Strict SemVer: v1.2.3 = stable; v1.2.3-beta.1 / -rc.1 / -alpha.1 = beta channel
|
|
if echo "$TAG" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+$'; then
|
|
CHANNEL=stable
|
|
PRERELEASE=false
|
|
TITLE="$TAG"
|
|
NOTES_KIND=stable
|
|
elif echo "$TAG" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+-(beta|rc|alpha)(\.[0-9]+)?$'; then
|
|
CHANNEL=beta
|
|
PRERELEASE=true
|
|
TITLE="$TAG (beta)"
|
|
NOTES_KIND=beta
|
|
else
|
|
echo "Unsupported host tag '$TAG'." >&2
|
|
echo "Use vX.Y.Z for stable or vX.Y.Z-beta.N / -rc.N / -alpha.N for beta." >&2
|
|
exit 1
|
|
fi
|
|
{
|
|
echo "channel=$CHANNEL"
|
|
echo "prerelease=$PRERELEASE"
|
|
echo "title=$TITLE"
|
|
echo "notes_kind=$NOTES_KIND"
|
|
} >> "$GITHUB_OUTPUT"
|
|
echo "tag=$TAG channel=$CHANNEL prerelease=$PRERELEASE"
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
# apps/proxy/device requires the newer toolchain; apps/cli is fine with it.
|
|
go-version-file: apps/proxy/device/go.mod
|
|
# Forgejo has no Actions cache server; setup-go cache-save hangs without one.
|
|
cache: false
|
|
|
|
- name: Build release artifacts
|
|
run: |
|
|
chmod +x scripts/build-release.sh
|
|
./scripts/build-release.sh "${{ github.ref_name }}"
|
|
ls -la dist/release
|
|
|
|
- name: Prepare release notes
|
|
run: |
|
|
set -euo pipefail
|
|
TAG="${{ github.ref_name }}"
|
|
CHANNEL="${{ steps.meta.outputs.channel }}"
|
|
NOTES="docs/releases/${TAG}.md"
|
|
if [ -f "$NOTES" ]; then
|
|
cp "$NOTES" /tmp/release-notes.md
|
|
echo "Using $NOTES"
|
|
else
|
|
cat > /tmp/release-notes.md <<EOF
|
|
Multi-platform **Streamd** host CLI + on-device MITM (\`proxy-android-arm64\`).
|
|
|
|
Channel: **${CHANNEL}** (rolling download tag \`${CHANNEL}\` also updated).
|
|
|
|
Prefer \`streamd-*\`. Matching \`drm-*\` files are identical compatibility copies for this release.
|
|
|
|
| Asset | Platform |
|
|
|---|---|
|
|
| \`streamd-windows-amd64.exe\` | Windows x86_64 |
|
|
| \`streamd-windows-arm64.exe\` | Windows ARM64 |
|
|
| \`streamd-linux-amd64\` | Linux x86_64 |
|
|
| \`streamd-linux-arm64\` | Linux ARM64 |
|
|
| \`streamd-darwin-amd64\` | macOS Intel |
|
|
| \`streamd-darwin-arm64\` | macOS Apple Silicon |
|
|
| \`drm-*\` | Same bytes as the matching \`streamd-*\` (compat) |
|
|
| \`proxy-android-arm64\` | On-device MITM (push with \`streamd proxy\`) |
|
|
| \`SHA256SUMS.txt\` | Checksums |
|
|
|
|
Always-latest URLs (no version pin):
|
|
- Stable: \`…/releases/download/stable/<asset>\`
|
|
- Beta: \`…/releases/download/beta/<asset>\`
|
|
|
|
Built with \`CGO_ENABLED=0\` via \`scripts/build-release.sh\`.
|
|
Phone capture still needs Magisk + \`streamd proxy install-ca --reinject\`.
|
|
EOF
|
|
echo "No $NOTES — using generic notes"
|
|
fi
|
|
cat > /tmp/channel-notes.md <<EOF
|
|
Rolling **${CHANNEL}** channel for Streamd.
|
|
|
|
Currently points at **${TAG}**.
|
|
Prefer versioned tags for pinned installs; use this channel for always-latest downloads.
|
|
|
|
\`\`\`text
|
|
…/releases/download/${CHANNEL}/streamd-linux-amd64
|
|
…/releases/download/${CHANNEL}/streamd-windows-amd64.exe
|
|
…/releases/download/${CHANNEL}/proxy-android-arm64
|
|
\`\`\`
|
|
EOF
|
|
|
|
- name: Upload versioned Forgejo release
|
|
uses: https://data.forgejo.org/actions/forgejo-release@v2.7.2
|
|
with:
|
|
direction: upload
|
|
url: https://git.nulldrm.com
|
|
repo: ${{ github.repository }}
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
tag: ${{ github.ref_name }}
|
|
sha: ${{ github.sha }}
|
|
release-dir: dist/release
|
|
title: ${{ steps.meta.outputs.title }}
|
|
prerelease: ${{ steps.meta.outputs.prerelease }}
|
|
override: true
|
|
release-notes-file: /tmp/release-notes.md
|
|
|
|
- name: Upload rolling channel release (stable / beta)
|
|
uses: https://data.forgejo.org/actions/forgejo-release@v2.7.2
|
|
with:
|
|
direction: upload
|
|
url: https://git.nulldrm.com
|
|
repo: ${{ github.repository }}
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
tag: ${{ steps.meta.outputs.channel }}
|
|
sha: ${{ github.sha }}
|
|
release-dir: dist/release
|
|
title: ${{ steps.meta.outputs.channel }} ← ${{ github.ref_name }}
|
|
prerelease: ${{ steps.meta.outputs.prerelease }}
|
|
override: true
|
|
release-notes-file: /tmp/channel-notes.md
|
|
|
|
- name: Announce on Telegram
|
|
env:
|
|
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
|
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
|
RELEASE_TAG: ${{ github.ref_name }}
|
|
RELEASE_KIND: host
|
|
RELEASE_CHANNEL: ${{ steps.meta.outputs.channel }}
|
|
RELEASE_URL: https://git.nulldrm.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}
|
|
run: |
|
|
if [ -z "$TELEGRAM_BOT_TOKEN" ]; then
|
|
echo "[!] TELEGRAM_BOT_TOKEN secret missing — skip announce"
|
|
exit 0
|
|
fi
|
|
# Null DRM Telegram group → Releases topic (t.me/c/3721978702/16).
|
|
export TELEGRAM_CHAT_ID="-1003721978702"
|
|
export TELEGRAM_MESSAGE_THREAD_ID="16"
|
|
if [ "${{ steps.meta.outputs.channel }}" = "beta" ]; then
|
|
export RELEASE_TITLE="Streamd ${{ github.ref_name }} (beta)"
|
|
else
|
|
export RELEASE_TITLE="Streamd ${{ github.ref_name }}"
|
|
fi
|
|
chmod +x scripts/notify-telegram.sh
|
|
./scripts/notify-telegram.sh "${{ github.ref_name }}"
|