mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-21 17:41:25 -08:00
fix(ci): publish AltStore manifests as release assets
This commit is contained in:
4 files changed
+31
-72
No files matched your search
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "Sable (nightly)",
|
||||
"identifier": "moe.sable.client.source.nightly",
|
||||
"subtitle": "Sable for iOS (nightly)",
|
||||
"description": "Sable iOS nightly builds for AltStore and SideStore, rebuilt on every push to dev.",
|
||||
"iconURL": "https://raw.githubusercontent.com/SableClient/Sable/dev/src-tauri/icons/icon.png",
|
||||
"website": "https://github.com/SableClient/Sable",
|
||||
"tintColor": "#5CA399",
|
||||
"featuredApps": ["moe.sable.client"],
|
||||
"apps": [
|
||||
{
|
||||
"name": "Sable",
|
||||
"bundleIdentifier": "moe.sable.client",
|
||||
"developerName": "SableClient",
|
||||
"subtitle": "Sable iOS (nightly)",
|
||||
"localizedDescription": "Sable for iOS. Nightly builds from dev; unsigned, resigned at install by AltStore/SideStore.",
|
||||
"iconURL": "https://raw.githubusercontent.com/SableClient/Sable/dev/src-tauri/icons/icon.png",
|
||||
"tintColor": "#5CA399",
|
||||
"category": "social",
|
||||
"screenshots": [],
|
||||
"versions": [],
|
||||
"appPermissions": {
|
||||
"entitlements": ["aps-environment"],
|
||||
"privacy": {
|
||||
"NSCameraUsageDescription": "Sable needs camera access for video calls.",
|
||||
"NSMicrophoneUsageDescription": "Sable needs microphone access for voice and video calls."
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"news": []
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "Sable",
|
||||
"identifier": "moe.sable.client.source",
|
||||
"subtitle": "Sable for iOS",
|
||||
"description": "Sable iOS builds for AltStore and SideStore.",
|
||||
"iconURL": "https://raw.githubusercontent.com/SableClient/Sable/dev/src-tauri/icons/icon.png",
|
||||
"website": "https://github.com/SableClient/Sable",
|
||||
"tintColor": "#5CA399",
|
||||
"featuredApps": ["moe.sable.client"],
|
||||
"apps": [
|
||||
{
|
||||
"name": "Sable",
|
||||
"bundleIdentifier": "moe.sable.client",
|
||||
"developerName": "SableClient",
|
||||
"subtitle": "Sable iOS",
|
||||
"localizedDescription": "Sable for iOS. Unsigned builds, resigned at install by AltStore/SideStore.",
|
||||
"iconURL": "https://raw.githubusercontent.com/SableClient/Sable/dev/src-tauri/icons/icon.png",
|
||||
"tintColor": "#5CA399",
|
||||
"category": "social",
|
||||
"screenshots": [],
|
||||
"versions": [],
|
||||
"appPermissions": {
|
||||
"entitlements": ["aps-environment"],
|
||||
"privacy": {
|
||||
"NSCameraUsageDescription": "Sable needs camera access for video calls.",
|
||||
"NSMicrophoneUsageDescription": "Sable needs microphone access for voice and video calls."
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"news": []
|
||||
}
|
||||
@@ -484,35 +484,10 @@ jobs:
|
||||
STEPS_IPA_OUTPUTS_PATH: ${{ steps.ipa.outputs.path }}
|
||||
run: gh release upload "$TAG" "${STEPS_IPA_OUTPUTS_PATH}" --clobber
|
||||
|
||||
- name: Generate bot token
|
||||
id: app-token
|
||||
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
||||
with:
|
||||
app-id: ${{ secrets.APP_ID }}
|
||||
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||
permission-contents: write
|
||||
|
||||
- name: Get GitHub App User ID
|
||||
id: get-user-id
|
||||
run: echo "user-id=$(gh api "/users/${STEPS_APP_TOKEN_OUTPUTS_APP_SLUG}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
STEPS_APP_TOKEN_OUTPUTS_APP_SLUG: ${{ steps.app-token.outputs.app-slug }}
|
||||
|
||||
- name: Configure bot git identity
|
||||
run: |
|
||||
git config --global user.name "${STEPS_APP_TOKEN_OUTPUTS_APP_SLUG}[bot]"
|
||||
git config --global user.email "${STEPS_GET_USER_ID_OUTPUTS_USER_ID}+${STEPS_APP_TOKEN_OUTPUTS_APP_SLUG}[bot]@users.noreply.github.com"
|
||||
gh auth setup-git
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
STEPS_APP_TOKEN_OUTPUTS_APP_SLUG: ${{ steps.app-token.outputs.app-slug }}
|
||||
STEPS_GET_USER_ID_OUTPUTS_USER_ID: ${{ steps.get-user-id.outputs.user-id }}
|
||||
|
||||
- name: Update AltStore/SideStore source
|
||||
shell: bash
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
REPO: ${{ github.repository }}
|
||||
NIGHTLY: ${{ needs.setup-release.outputs.nightly }}
|
||||
ALTSTORE_VERSION: ${{ steps.ipa.outputs.ipa_version }}
|
||||
@@ -530,45 +505,38 @@ jobs:
|
||||
fi
|
||||
DOWNLOAD_URL="https://github.com/$REPO/releases/download/$TAG/${STEPS_IPA_OUTPUTS_NAME}"
|
||||
DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
|
||||
WT="$RUNNER_TEMP/altstore-source"
|
||||
MANIFEST="$RUNNER_TEMP/$SOURCE_FILE"
|
||||
|
||||
# Commit the updated manifest to the repo root on dev so version
|
||||
# history persists; [skip ci] avoids retriggering builds.
|
||||
UPDATED=0
|
||||
for attempt in 1 2 3; do
|
||||
git fetch origin dev
|
||||
git worktree remove --force "$WT" 2>/dev/null || true
|
||||
git worktree add --detach "$WT" origin/dev
|
||||
node .github/scripts/update-altstore-source.mjs \
|
||||
"$WT/$SOURCE_FILE" "${ALTSTORE_VERSION:-$VERSION}" "${ALTSTORE_VERSION_BUILD:-$VERSION}" "${STEPS_IPA_OUTPUTS_SIZE}" "$DOWNLOAD_URL" "$DATE" "Sable $VERSION"
|
||||
pnpm oxfmt "$WT/$SOURCE_FILE"
|
||||
git -C "$WT" add "$SOURCE_FILE"
|
||||
if git -C "$WT" diff --cached --quiet; then
|
||||
echo "$SOURCE_FILE already up to date on dev"
|
||||
UPDATED=1
|
||||
break
|
||||
if [ "$NIGHTLY" = "true" ]; then
|
||||
cp ".github/templates/$SOURCE_FILE" "$MANIFEST"
|
||||
else
|
||||
# Preserve the stable rollback history from the latest prior release.
|
||||
PREVIOUS_TAG="$(
|
||||
gh release list --limit 100 --exclude-pre-releases --json tagName --jq \
|
||||
'.[] | select(.tagName != env.TAG) | .tagName' \
|
||||
| while read -r candidate; do
|
||||
if gh release view "$candidate" --json assets --jq '.assets[].name' | grep -qx "$SOURCE_FILE"; then
|
||||
echo "$candidate"
|
||||
break
|
||||
fi
|
||||
done
|
||||
)"
|
||||
if [ -n "$PREVIOUS_TAG" ]; then
|
||||
gh release download "$PREVIOUS_TAG" --pattern "$SOURCE_FILE" --output "$MANIFEST"
|
||||
else
|
||||
cp ".github/templates/$SOURCE_FILE" "$MANIFEST"
|
||||
fi
|
||||
git -C "$WT" commit -m "chore: update $SOURCE_FILE for $TAG [skip ci]"
|
||||
if git -C "$WT" push origin HEAD:dev; then
|
||||
UPDATED=1
|
||||
break
|
||||
fi
|
||||
echo "Push to dev failed (attempt $attempt); retrying from latest dev tip"
|
||||
done
|
||||
if [ "$UPDATED" != "1" ]; then
|
||||
git worktree remove --force "$WT" 2>/dev/null || true
|
||||
echo "Failed to commit $SOURCE_FILE to dev" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Keep the release asset in sync for users on the release-asset source URLs.
|
||||
gh release upload "$TAG" "$WT/$SOURCE_FILE" --clobber
|
||||
node .github/scripts/update-altstore-source.mjs \
|
||||
"$MANIFEST" "${ALTSTORE_VERSION:-$VERSION}" "${ALTSTORE_VERSION_BUILD:-$VERSION}" "${STEPS_IPA_OUTPUTS_SIZE}" "$DOWNLOAD_URL" "$DATE" "Sable $VERSION"
|
||||
pnpm oxfmt "$MANIFEST"
|
||||
gh release upload "$TAG" "$MANIFEST#$SOURCE_FILE" --clobber
|
||||
if [ "$NIGHTLY" = "true" ]; then
|
||||
# Existing nightly sources point at releases/download/nightly/altstore-source.json.
|
||||
cp "$WT/$SOURCE_FILE" "$RUNNER_TEMP/altstore-source.json"
|
||||
cp "$MANIFEST" "$RUNNER_TEMP/altstore-source.json"
|
||||
gh release upload "$TAG" "$RUNNER_TEMP/altstore-source.json" --clobber
|
||||
fi
|
||||
git worktree remove --force "$WT" 2>/dev/null || true
|
||||
|
||||
updater-manifest:
|
||||
name: Publish updater manifest
|
||||
|
||||
Reference in new issue
Block a user