Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .github/workflows/release-os-ota-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ on:
description: Attempt that successfully completed the protected Pixel sign job
required: false
type: string
channel_tag:
description: OS GitHub release channel tag (defaults to os-pilot; use a dedicated os-* tag such as os-stable for user/release-keys OTAs while os-pilot serves userdebug/test-keys pilot phones)
required: false
type: string

permissions: {}

Expand Down Expand Up @@ -183,19 +187,22 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
ASSET_NAME: ${{ inputs.asset_name }}
CHANNEL_TAG: ${{ inputs.channel_tag }}
run: |
set -euo pipefail
work="$OS_PUBLISH_WORK"
pnpm -s release os-manifest --ota "$work/ota.zip" --asset "$OS_ASSET_NAME" --out "$work/alpha-os-update.json"
OS_CHANNEL_TAG=${CHANNEL_TAG:-os-pilot}
[[ "$OS_CHANNEL_TAG" =~ ^os-[A-Za-z0-9][A-Za-z0-9._-]{0,124}$ ]] || { echo "Invalid channel_tag: $OS_CHANNEL_TAG" >&2; exit 1; }
pnpm -s release os-manifest --ota "$work/ota.zip" --asset "$OS_ASSET_NAME" --tag "$OS_CHANNEL_TAG" --out "$work/alpha-os-update.json"
if [[ -f "$RUNNER_TEMP/pixel-bundle-receipts/pins.json" ]]; then
node ../../packages/cli/src/main.ts pixel-bundle --check --json --receipts "$RUNNER_TEMP/pixel-bundle-receipts" --manifest "$work/alpha-os-update.json"
fi
live=https://github.com/AlphaPhone/alpha/releases/download/os-pilot/alpha-os-update.json
live="https://github.com/AlphaPhone/alpha/releases/download/$OS_CHANNEL_TAG/alpha-os-update.json"
if ! curl -fsSL --proto '=https' --proto-redir '=https' --max-redirs 3 --max-filesize 65536 "$live" -o "$work/live.json" ||
! cmp -s "$work/live.json" "$work/alpha-os-update.json"; then
pnpm -s release os-publish --run "$work/os-run.json" --ota "$work/ota.zip" --manifest "$work/alpha-os-update.json" --execute
pnpm -s release os-publish --run "$work/os-run.json" --ota "$work/ota.zip" --manifest "$work/alpha-os-update.json" --tag "$OS_CHANNEL_TAG" --enrollment aosp/pilot-system-update-enrollment.json --execute
fi
pnpm -s release os-status --run "$work/os-run.json" --manifest "$work/alpha-os-update.json"
pnpm -s release os-status --run "$work/os-run.json" --manifest "$work/alpha-os-update.json" --tag "$OS_CHANNEL_TAG"
- uses: actions/upload-artifact@v5
if: always()
with:
Expand Down
Loading
Loading