mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-28 13:32:23 +00:00
Split monolithic inline bash from release.yml and release-packages.yml into standalone scripts under scripts/release/ for easier debugging and manual execution. New scripts: - bump-version.js: version bumping across package.json/tauri/Cargo - stage-sidecar.sh: stage + verify sidecar binary for Tauri bundler - sign-and-notarize-macos.sh: macOS code signing and notarization - repackage-dmg.sh: re-create and notarize DMG post-signing - upload-macos-artifacts.sh: re-upload notarized artifacts to release - package-cli-tarball.sh: package CLI binary into release tarball - build-linux-arm64.sh: build Linux arm64 CLI tarball - update-homebrew.sh: render and commit Homebrew formula to tap - build-apt-packages.sh: build .deb packages and apt repository - publish-npm.sh: stamp version and publish npm package Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
40 lines
1.7 KiB
Bash
Executable File
40 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Re-upload notarized macOS artifacts (DMG + .app tarball) to GitHub release.
|
|
#
|
|
# Usage:
|
|
# upload-macos-artifacts.sh <app_path> <bundle_dir> <version> <arch>
|
|
#
|
|
# Required environment:
|
|
# GITHUB_TOKEN
|
|
# RELEASE_ID
|
|
set -euo pipefail
|
|
|
|
APP_PATH="${1:?Usage: upload-macos-artifacts.sh <app_path> <bundle_dir> <version> <arch>}"
|
|
BUNDLE_DIR="${2:?}"
|
|
VERSION="${3:?}"
|
|
ARCH="${4:?}"
|
|
UPLOAD_REPO="${UPLOAD_REPO:-tinyhumansai/openhuman}"
|
|
|
|
# ── Re-upload DMG ────────────────────────────────────────────────────────────
|
|
DMG_PATH="$(find "$BUNDLE_DIR/dmg" -name '*.dmg' -maxdepth 1 2>/dev/null | head -1)"
|
|
if [ -n "$DMG_PATH" ]; then
|
|
DMG_NAME="$(basename "$DMG_PATH")"
|
|
echo "[upload] Deleting old DMG asset from release..."
|
|
ASSET_ID="$(gh api "repos/${UPLOAD_REPO}/releases/${RELEASE_ID}/assets" \
|
|
--jq ".[] | select(.name == \"$DMG_NAME\") | .id" 2>/dev/null || true)"
|
|
if [ -n "$ASSET_ID" ]; then
|
|
gh api -X DELETE "repos/${UPLOAD_REPO}/releases/assets/$ASSET_ID" || true
|
|
fi
|
|
echo "[upload] Uploading notarized DMG..."
|
|
gh release upload "v${VERSION}" "$DMG_PATH" --repo "$UPLOAD_REPO" --clobber
|
|
fi
|
|
|
|
# ── Upload .app as tar.gz ────────────────────────────────────────────────────
|
|
if [ -n "$APP_PATH" ] && [ -d "$APP_PATH" ]; then
|
|
APP_ZIP="/tmp/OpenHuman_${VERSION}_${ARCH}.app.tar.gz"
|
|
tar -czf "$APP_ZIP" -C "$(dirname "$APP_PATH")" "$(basename "$APP_PATH")"
|
|
gh release upload "v${VERSION}" "$APP_ZIP" --repo "$UPLOAD_REPO" --clobber
|
|
rm -f "$APP_ZIP"
|
|
echo "[upload] Uploaded .app tarball"
|
|
fi
|