Skip to content
Merged
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
28 changes: 3 additions & 25 deletions .github/workflows/release-preparation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ jobs:
run: |
VERSION="${{ needs.release-meta.outputs.version }}"
OUTPUT_DIR="artifacts/amd64"
VERSION="$VERSION" PLATFORM="linux" ARCH="amd64" OUTPUT_DIR="$OUTPUT_DIR" ./packaging/build_bundle.sh
VERSION="$VERSION" PLATFORM="linux" ARCH="x86_64" OUTPUT_DIR="$OUTPUT_DIR" ./packaging/build_bundle.sh
ls -lah "$OUTPUT_DIR"

- name: Smoke test bundle install
run: |
VERSION="${{ needs.release-meta.outputs.version }}"
OUTPUT_DIR="artifacts/amd64"
BUNDLE="aish-${VERSION}-linux-amd64"
BUNDLE="aish-${VERSION}-linux-x86_64"
EXTRACT_DIR="$PWD/build/install-smoke"
INSTALL_ROOT="$PWD/build/install-root"

Expand All @@ -116,28 +116,6 @@ jobs:
test -x "$INSTALL_ROOT/usr/local/bin/aish-sandbox"
test -f "$INSTALL_ROOT/etc/aish/security_policy.yaml"

- name: Validate CDN release layout
run: |
VERSION="${{ needs.release-meta.outputs.version }}"
OUTPUT_DIR="artifacts/amd64"
BUNDLE="aish-${VERSION}-linux-amd64.tar.gz"
SHA_FILE="${BUNDLE}.sha256"
RELEASE_LAYOUT="$PWD/build/release-layout/download"

rm -rf "$RELEASE_LAYOUT"
mkdir -p "$RELEASE_LAYOUT/releases/${VERSION}"
cp "$OUTPUT_DIR/$BUNDLE" "$RELEASE_LAYOUT/releases/${VERSION}/"
cp "$OUTPUT_DIR/$SHA_FILE" "$RELEASE_LAYOUT/releases/${VERSION}/"
printf '%s' "$VERSION" > "$RELEASE_LAYOUT/latest"

test -f "$RELEASE_LAYOUT/latest"
test -f "$RELEASE_LAYOUT/releases/${VERSION}/$BUNDLE"
test -f "$RELEASE_LAYOUT/releases/${VERSION}/$SHA_FILE"
(
cd "$RELEASE_LAYOUT/releases/${VERSION}"
sha256sum -c "$SHA_FILE"
)

- name: Upload dry-run artifacts
uses: actions/upload-artifact@v6
with:
Expand All @@ -162,5 +140,5 @@ jobs:
- Tag: ${{ needs.release-meta.outputs.tag }}
- Previous stable tag: ${{ needs.release-meta.outputs.previous_stable_tag || 'none' }}

Release metadata artifacts, CDN layout validation, and dry-run bundle validation have completed successfully.
Release metadata artifacts and dry-run bundle validation have completed successfully.
EOF
53 changes: 3 additions & 50 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ jobs:
run: |
VERSION="${{ needs.release-meta.outputs.version }}"
OUTPUT_DIR="artifacts/amd64"
VERSION="$VERSION" PLATFORM="linux" ARCH="amd64" OUTPUT_DIR="$OUTPUT_DIR" ./packaging/build_bundle.sh
VERSION="$VERSION" PLATFORM="linux" ARCH="x86_64" OUTPUT_DIR="$OUTPUT_DIR" ./packaging/build_bundle.sh
ls -lah "$OUTPUT_DIR"

- name: Smoke test bundle install
run: |
VERSION="${{ needs.release-meta.outputs.version }}"
OUTPUT_DIR="artifacts/amd64"
BUNDLE="aish-${VERSION}-linux-amd64"
BUNDLE="aish-${VERSION}-linux-x86_64"
EXTRACT_DIR="$PWD/build/install-smoke"
INSTALL_ROOT="$PWD/build/install-root"

Expand All @@ -126,58 +126,11 @@ jobs:
tag_name: ${{ needs.release-meta.outputs.tag }}
files: artifacts/amd64/*

- name: Upload release artifacts
uses: actions/upload-artifact@v6
with:
name: release-bundle-linux-amd64
path: artifacts/amd64/*
if-no-files-found: error

publish-release-bundles:
name: Publish release bundles
needs:
- release-meta
- release-gate
- build-release-bundle
runs-on: ubuntu-latest
environment: release
env:
VERSION: ${{ needs.release-meta.outputs.version }}
ARTIFACT_ROOT: artifacts/release
R2_BUCKET: ${{ secrets.R2_BUCKET }}
R2_ENDPOINT: ${{ secrets.R2_ENDPOINT }}
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: auto
CDN_BASE_URL: ${{ vars.CDN_BASE_URL }}
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Download release artifacts
uses: actions/download-artifact@v6
with:
pattern: release-bundle-linux-*
path: ${{ env.ARTIFACT_ROOT }}

- name: Ensure aws CLI is available
run: |
if ! command -v aws >/dev/null 2>&1; then
sudo apt-get update
sudo apt-get install -y awscli
fi
aws --version

- name: Publish release bundles
run: bash ./packaging/scripts/publish_release.sh

release-summary:
name: Summarize published release
needs:
- release-meta
- create-release
- build-release-bundle
- publish-release-bundles
runs-on: ubuntu-latest
steps:
- name: Write job summary
Expand All @@ -188,5 +141,5 @@ jobs:
- Version: ${{ needs.release-meta.outputs.version }}
- Tag: ${{ needs.release-meta.outputs.tag }}

GitHub Release metadata was generated from the tag push, bundle assets were uploaded to both GitHub Release and the release bucket, and download/latest was updated successfully.
GitHub Release metadata was generated from the tag push, and bundle assets were uploaded successfully.
EOF
8 changes: 2 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- `aish update` command for self-updating to the latest stable version from CDN-hosted release metadata
- `aish update` command for self-updating to latest version from GitHub releases
- `aish uninstall` command for uninstalling aish with optional `--purge` flag
- UpdateManager class for handling stable CDN update logic and GitHub pre-release discovery
- UpdateManager class for handling update logic with GitHub API integration
- UninstallManager class for handling uninstall logic and data cleanup
- i18n support for update and uninstall commands in Chinese and English
- DejaGnu integration tests for update and uninstall commands

### Changed

- Changed stable self-update and release publication to use the CDN layout `download/latest` plus `download/releases/<version>/...`, while preserving GitHub releases for pre-release discovery and release pages.

## [0.2.0] - 2026-04-03

### Added
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ Welcome to make Shell smarter!
- `Release Metadata` is the shared release action that normalizes stable version inputs, validates repository version state, and uploads both markdown and JSON metadata artifacts.
- `make prepare-release-files VERSION=X.Y.Z [DATE=YYYY-MM-DD]` updates `pyproject.toml`, `src/aish/__init__.py`, `uv.lock`, and inserts a dated release section at the top of `CHANGELOG.md`.
- Prepare release files locally in a normal PR, merge that PR into `main`, then run `Release Preparation` as the single preflight validation for the target stable version. It now includes release metadata checks, bundle dry-run validation, and live smoke validation with real provider credentials.
- `Release Preparation` validates the target stable version, generates a release summary from the versioned changelog section, builds dry-run bundles, verifies the CDN layout (`download/latest` and `download/releases/<version>/...`), and runs install smoke checks before publication.
- `Release` is triggered by pushing a stable tag `vX.Y.Z`. It validates the tag against repository metadata, verifies that the tagged commit is on `main`, waits on the protected `release` environment approval gate, creates the GitHub Release entry with generated notes, uploads bundle assets, and publishes the same artifacts to the CDN release layout used by the installer and stable self-update.
- `Release Preparation` validates the target stable version, generates a release summary from the versioned changelog section, builds dry-run bundles, and runs install smoke checks before publication.
- `Release` is triggered by pushing a stable tag `vX.Y.Z`. It validates the tag against repository metadata, verifies that the tagged commit is on `main`, waits on the protected `release` environment approval gate, creates the GitHub Release entry with generated notes, and uploads bundle assets.
- Configure the GitHub Environment named `release` with required reviewers if you want manual approval before production publishing.

## Python Code Style
Expand Down
8 changes: 3 additions & 5 deletions QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@
curl -fsSL https://www.aishell.ai/repo/install.sh | bash
```

The installer reads stable version metadata from `https://cdn.aishell.ai/download/latest` and downloads bundles from `https://cdn.aishell.ai/download/releases/<version>/`. Override behavior with `AISH_DOWNLOAD_BASE_URL`, `AISH_LATEST_URL`, or the legacy alias `AISH_REPO_URL` when needed.

### Method 2: Manual Bundle Install

Download the published stable bundle `aish-<version>-linux-amd64.tar.gz` from the CDN release directory `https://cdn.aishell.ai/download/releases/<version>/` (use `amd64`, not `x86_64`), then run:
Download the matching `aish-<version>-linux-<arch>.tar.gz` bundle from the official release directory, then run:

```bash
tar -xzf aish-<version>-linux-amd64.tar.gz
cd aish-<version>-linux-amd64
tar -xzf aish-<version>-linux-<arch>.tar.gz
cd aish-<version>-linux-<arch>
sudo ./install.sh
```

Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,13 @@ Empower the Shell to think. Evolve Operations.
curl -fsSL https://www.aishell.ai/repo/install.sh | bash
```

The installer resolves stable versions from `https://cdn.aishell.ai/download/latest` and downloads bundles from `https://cdn.aishell.ai/download/releases/<version>/...`. You can override this with `AISH_DOWNLOAD_BASE_URL`, `AISH_LATEST_URL`, or the legacy alias `AISH_REPO_URL`.

#### Option 2: Manual bundle install

Download the published stable bundle `aish-<version>-linux-amd64.tar.gz` from the CDN release directory `https://cdn.aishell.ai/download/releases/<version>/` (use `amd64`, not `x86_64`), then run:
Download the matching `aish-<version>-linux-<arch>.tar.gz` bundle from the official release directory, then run:

```bash
tar -xzf aish-<version>-linux-amd64.tar.gz
cd aish-<version>-linux-amd64
tar -xzf aish-<version>-linux-<arch>.tar.gz
cd aish-<version>-linux-<arch>
sudo ./install.sh
```

Expand Down Expand Up @@ -128,7 +126,7 @@ aish> ;explain this command: tar -czf a.tgz ./dir
curl -fsSL https://www.aishell.ai/repo/install.sh | bash
```

The installer resolves the latest stable version from `https://cdn.aishell.ai/download/latest`, downloads the matching bundle from `https://cdn.aishell.ai/download/releases/<version>/`, and installs `aish`, `aish-sandbox`, and `aish-uninstall` into `/usr/local/bin`.
The installer resolves the latest release directory under `https://www.aishell.ai/repo`, downloads the matching bundle for your architecture, and installs `aish`, `aish-sandbox`, and `aish-uninstall` into `/usr/local/bin`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Documentation describes mirror URL as primary source, but code uses GitHub as primary.

The installer description states it resolves releases under https://www.aishell.ai/repo, but update.rs uses GitHub Releases as the primary download source with aishell.ai/repo as the fallback mirror. Consider updating documentation to reflect the actual primary-then-fallback behavior.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 129, The README sentence claiming the installer resolves
releases under https://www.aishell.ai/repo is inaccurate relative to update.rs;
update the installer description to state that the installer queries GitHub
Releases as the primary source and only falls back to the aishell.ai mirror
(https://www.aishell.ai/repo) if GitHub release retrieval fails — mention
"update.rs" and "GitHub Releases" (primary) and "https://www.aishell.ai/repo"
(fallback) so readers can map the behavior to the code.


### Run from Source (Development/Trial)

Expand Down
Loading
Loading