mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-20 00:51:17 -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
@@ -18,16 +18,7 @@
|
||||
"tintColor": "#5CA399",
|
||||
"category": "social",
|
||||
"screenshots": [],
|
||||
"versions": [
|
||||
{
|
||||
"version": "1.20.1786646530",
|
||||
"buildVersion": "1.20.1786646530",
|
||||
"date": "2026-08-13T18:55:05Z",
|
||||
"size": 28860897,
|
||||
"downloadURL": "https://github.com/SableClient/Sable/releases/download/nightly/Sable-1.20.1-nightly.260813184210-ios-arm64.ipa",
|
||||
"localizedDescription": "Sable 1.20.1-nightly.260813184210"
|
||||
}
|
||||
],
|
||||
"versions": [],
|
||||
"appPermissions": {
|
||||
"entitlements": ["aps-environment"],
|
||||
"privacy": {
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "Sable",
|
||||
"identifier": "moe.sable.client.source",
|
||||
"subtitle": "Sable for iOS",
|
||||
"description": "Sable iOS nightly builds for AltStore and SideStore.",
|
||||
"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",
|
||||
@@ -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
|
||||
|
||||
@@ -87,10 +87,10 @@ Sable iOS builds are distributed as unsigned IPAs through [AltStore](https://alt
|
||||
|
||||
1. Set up [AltStore Classic](https://faq.altstore.io/altstore-classic/altserver) or [SideStore](https://docs.sidestore.io) on your device.
|
||||
2. Add the Sable source (tap a button above), or add it manually:
|
||||
- AltStore (stable): `altstore://source?url=https://raw.githubusercontent.com/SableClient/Sable/dev/altstore-source.json`
|
||||
- SideStore (stable): `sidestore://source?url=https://raw.githubusercontent.com/SableClient/Sable/dev/altstore-source.json`
|
||||
- AltStore (nightly): `altstore://source?url=https://raw.githubusercontent.com/SableClient/Sable/dev/altstore-source-nightly.json`
|
||||
- SideStore (nightly): `sidestore://source?url=https://raw.githubusercontent.com/SableClient/Sable/dev/altstore-source-nightly.json`
|
||||
- AltStore (stable): `altstore://source?url=https://github.com/SableClient/Sable/releases/latest/download/altstore-source.json`
|
||||
- SideStore (stable): `sidestore://source?url=https://github.com/SableClient/Sable/releases/latest/download/altstore-source.json`
|
||||
- AltStore (nightly): `altstore://source?url=https://github.com/SableClient/Sable/releases/download/nightly/altstore-source.json`
|
||||
- SideStore (nightly): `sidestore://source?url=https://github.com/SableClient/Sable/releases/download/nightly/altstore-source.json`
|
||||
3. Install Sable from the source. The IPA is unsigned; AltStore/SideStore re-sign it with your personal development certificate at install time, so apps refresh every 7 days (the standard free-account limitation).
|
||||
|
||||
iOS builds are produced by the `ios` job in [`tauri-build.yml`](.github/workflows/tauri-build.yml) and track the same `dev`/`v*` triggers as desktop builds.
|
||||
|
||||
Reference in new issue
Block a user