Send host/modules release messages to chat -1003721978702 topic 16 instead of the maintainer DM.
88 lines
3.3 KiB
YAML
88 lines
3.3 KiB
YAML
# Build multi-platform drm binaries + Android MITM and attach them to a Forgejo release.
|
|
#
|
|
# Trigger: push a version tag
|
|
# git tag v1.2.3 && git push origin v1.2.3
|
|
#
|
|
# 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: 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: Upload to Forgejo release
|
|
uses: https://data.forgejo.org/actions/forgejo-release@v2.7.2
|
|
with:
|
|
direction: upload
|
|
# Defaults to this runner's Forgejo URL when omitted.
|
|
url: https://git.nulldrm.com
|
|
repo: ${{ github.repository }}
|
|
# Built-in job token (write:repository). Override with a PAT secret if needed.
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
tag: ${{ github.ref_name }}
|
|
sha: ${{ github.sha }}
|
|
release-dir: dist/release
|
|
title: ${{ github.ref_name }}
|
|
override: true
|
|
release-notes: |
|
|
Multi-platform `drm` host CLI + on-device MITM (`proxy-android-arm64`).
|
|
|
|
| Asset | Platform |
|
|
|---|---|
|
|
| `drm-windows-amd64.exe` | Windows x86_64 |
|
|
| `drm-windows-arm64.exe` | Windows ARM64 |
|
|
| `drm-linux-amd64` | Linux x86_64 |
|
|
| `drm-linux-arm64` | Linux ARM64 |
|
|
| `drm-darwin-amd64` | macOS Intel |
|
|
| `drm-darwin-arm64` | macOS Apple Silicon |
|
|
| `proxy-android-arm64` | On-device MITM (push with `drm proxy`) |
|
|
| `SHA256SUMS.txt` | Checksums |
|
|
|
|
Built with `CGO_ENABLED=0` via `scripts/build-release.sh`.
|
|
Phone capture still needs Magisk + `drm proxy install-ca --reinject`.
|
|
|
|
- name: Announce on Telegram
|
|
env:
|
|
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
|
# Private DM chat (@error404developer). Override via secret if needed.
|
|
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
|
RELEASE_TAG: ${{ github.ref_name }}
|
|
RELEASE_KIND: host
|
|
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"
|
|
chmod +x scripts/notify-telegram.sh
|
|
./scripts/notify-telegram.sh "${{ github.ref_name }}"
|