Release CI: libmpv/epoxy deps, stable Flutter, multipart asset upload

The v0.1.0 release job failed: media_kit_video needs libmpv-dev and
libepoxy-dev at build time. Build on stable (what's verified locally),
work on root-only runner images, upload the asset as Gitea's multipart
attachment, and reuse an existing release on re-runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
foxyzandClaude Opus 5.5 committed 2026-10-07 03:15:35 +03:00
1 parent 165cd2a7f9
commit 75d8651f17
2 files changed
+23 -14

No files matched your search

+8 -6
View File
@@ -14,15 +14,17 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- name: Install Linux build deps - name: Install Linux build deps
# media_kit_video links libmpv + epoxy via pkg-config. Runner images
# differ: some run as root without sudo.
run: | run: |
if command -v apt-get >/dev/null; then SUDO=sudo; [ "$(id -u)" = 0 ] && SUDO=
sudo apt-get update $SUDO apt-get update
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev $SUDO apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev \
fi liblzma-dev g++ libmpv-dev libepoxy-dev xz-utils unzip curl python3
- name: Setup Flutter (beta) - name: Setup Flutter (stable)
run: | run: |
git clone https://github.com/flutter/flutter.git -b beta --depth 1 ~/flutter git clone https://github.com/flutter/flutter.git -b stable --depth 1 ~/flutter
echo "$HOME/flutter/bin" >> $GITHUB_PATH echo "$HOME/flutter/bin" >> $GITHUB_PATH
- name: Build tarball - name: Build tarball
+15 -8
View File
@@ -35,15 +35,22 @@ else
fi fi
export REL_TAG="$TAG" REL_VER="$VER" REL_NOTES="$NOTES" export REL_TAG="$TAG" REL_VER="$VER" REL_NOTES="$NOTES"
echo "creating release $TAG on $REPO ..." API="$SERVER/api/v1/repos/$REPO"
REL_ID="$(curl -fsS -H "Authorization: token $TOKEN" -H 'Content-Type: application/json' \ # Re-runs reuse the release for this tag instead of failing on a duplicate.
-d "$(python3 -c 'import json,os; print(json.dumps({"tag_name": os.environ["REL_TAG"], "name": os.environ["REL_TAG"], "body": "Watch together " + os.environ["REL_VER"] + "\n\n" + os.environ["REL_NOTES"], "draft": False, "prerelease": False}))')" \ REL_ID="$(curl -fsS -H "Authorization: token $TOKEN" "$API/releases/tags/$TAG" 2>/dev/null \
"$SERVER/api/v1/repos/$REPO/releases" \ | python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])' 2>/dev/null || true)"
| python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])')" if [[ -z "$REL_ID" ]]; then
echo "creating release $TAG on $REPO ..."
REL_ID="$(curl -fsS -H "Authorization: token $TOKEN" -H 'Content-Type: application/json' \
-d "$(python3 -c 'import json,os; print(json.dumps({"tag_name": os.environ["REL_TAG"], "name": os.environ["REL_TAG"], "body": "Watch together " + os.environ["REL_VER"] + "\n\n" + os.environ["REL_NOTES"], "draft": False, "prerelease": False}))')" \
"$API/releases" \
| python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])')"
fi
echo "release id: $REL_ID" echo "release id: $REL_ID"
echo "uploading $ASSET ..." echo "uploading $ASSET ..."
curl -fsS -H "Authorization: token $TOKEN" -H 'Content-Type: application/gzip' \ # Gitea's asset API takes a multipart form with an `attachment` field.
--data-binary "@$TARBALL" \ curl -fsS -H "Authorization: token $TOKEN" \
"$SERVER/api/v1/repos/$REPO/releases/$REL_ID/assets?name=$ASSET" > /dev/null -F "attachment=@$TARBALL;type=application/gzip" \
"$API/releases/$REL_ID/assets?name=$ASSET" > /dev/null
echo "published $TAG." echo "published $TAG."