airi/.github/scripts
Lovehsigure_520 65751f598d
Some checks are pending
CI / Lint (push) Waiting to run
CI / Build Test (stage-tamagotchi) (push) Waiting to run
CI / Build Test (stage-tamagotchi-godot) (push) Waiting to run
CI / Build Test (stage-web) (push) Waiting to run
CI / Build Test (ui-loading-screens) (push) Waiting to run
CI / Build Test (ui-transitions) (push) Waiting to run
CI / Type Check (push) Waiting to run
CI / Check Provenance (push) Waiting to run
Cloudflare Workers / Deploy - stage-web (push) Waiting to run
Update Nix pnpmDeps Hash / update (push) Waiting to run
chore(ci): mirror release assets to GitCode (#1797)
## Summary

Adds GitCode Release mirroring for AIRI release assets.

- Adds a reusable `.github/scripts/publish-gitcode-release.sh` helper
that creates or reuses the matching GitCode release, compares GitHub and
GitCode asset names, downloads only missing `AIRI-*` and `latest-*.yml`
assets, uploads them through GitCode's upload URL API, and verifies the
final asset list.
- Hooks the mirror step into desktop, Android, and iOS release workflows
so assets produced by separate release jobs can converge on the same
GitCode release.
- Keeps the mirror idempotent so repeated or concurrent release
workflows skip already mirrored files.

## Why

GitHub Releases are slow for many mainland China users. GitCode provides
a domestic fallback release page, but manually copying installers after
every release is error-prone and tedious.

## Validation

- `bash -n .github/scripts/publish-gitcode-release.sh`
- YAML parsing for:
  - `.github/workflows/release-tamagotchi.yml`
  - `.github/workflows/release-pocket-android.yml`
  - `.github/workflows/release-pocket-ios.yml`
- `git diff --check -- .github/scripts/publish-gitcode-release.sh
.github/workflows/release-tamagotchi.yml
.github/workflows/release-pocket-android.yml
.github/workflows/release-pocket-ios.yml`
- Local idempotency check against existing `v0.10.1` GitHub/GitCode
releases:
  - GitCode release already exists
  - all mirrored assets already present
  - final asset verification passed

## Setup Required

The target repository needs these GitHub Secrets:

- `GITCODE_TOKEN`
- `GITCODE_OWNER`
- `GITCODE_REPO`

For the current GitCode project, `GITCODE_OWNER` should remain `MoeruAI`
because GitCode's API and release download paths currently resolve that
namespace even though the UI displays `moeru-ai`.
2026-05-19 21:49:26 +08:00
..
publish-gitcode-release.sh chore(ci): mirror release assets to GitCode (#1797) 2026-05-19 21:49:26 +08:00