Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
57e539f
docs: :memo: align release flow docs with current process
LyCecilion Aug 3, 2026
867ca51
docs: :memo: codify merge-last release-plz PR ordering
LyCecilion Aug 3, 2026
f535393
docs: :memo: keep release-plz next-version PR as release starting point
LyCecilion Aug 3, 2026
8c71e0c
feat: :sparkles: embed Windows PE resources (version info + app icon)
LyCecilion Aug 4, 2026
ef7fa8b
feat: :art: figlet + lolcat rainbow banner in interactive mode
LyCecilion Aug 4, 2026
27d0e95
docs: :memo: add changelog about the change
LyCecilion Aug 4, 2026
6f1084c
Merge pull request #30 from LyCecilion/feat/windows-pe-resource
LyCecilion Aug 4, 2026
3f533b4
Merge branch 'develop' into feat/figlet_lolcat
LyCecilion Aug 4, 2026
0e3b56f
Merge pull request #31 from LyCecilion/feat/figlet_lolcat
LyCecilion Aug 4, 2026
e916e26
docs: :memo: clarify user config dir per platform
LyCecilion Aug 4, 2026
b25fbef
docs: :lock: add privacy & security docs
LyCecilion Aug 4, 2026
a2fcff8
Merge pull request #32 from LyCecilion/docs/meta
LyCecilion Aug 4, 2026
5bbad26
fix: :memo: fix vulnerability reporting url
LyCecilion Aug 4, 2026
54d1fe0
chore: :arrow_up: add Dependabot config for cargo and GitHub Actions
LyCecilion Aug 4, 2026
2623623
chore: :arrow_up: move dependabot.yml into .github
LyCecilion Aug 4, 2026
fa4d902
chore: :arrow_up: update dependencies
LyCecilion Aug 4, 2026
7e84102
ci: :green_heart: add test and lint workflow
LyCecilion Aug 4, 2026
a9f1db3
ci: :bug: install cargo-deny before license check
LyCecilion Aug 4, 2026
cb44e3c
chore: :arrow_up: bump base64, dialoguer, indicatif, rustyline, table…
LyCecilion Aug 4, 2026
9157194
chore: :arrow_up: bump actions/checkout to v7 in release-plz; ignore …
LyCecilion Aug 4, 2026
a2ec538
ci: :lock: set explicit least-privilege permissions
LyCecilion Aug 4, 2026
23b8c29
refactor(instance)!: remove flat call of instance
LyCecilion Aug 5, 2026
caf6103
Merge pull request #42 from LyCecilion/feat/new_instance_usage
LyCecilion Aug 5, 2026
2d9e819
chore: :label: register v2.0.x codename TearJerker (#43)
LyCecilion Aug 5, 2026
f0292a7
chore: :bookmark: release v2.0.0 (#29)
github-actions[bot] Aug 5, 2026
507210c
chore: :bookmark: prepare v2.0.0 release
LyCecilion Aug 5, 2026
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
45 changes: 45 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Dependabot version updates
# Docs: https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
# Rust crate dependencies (Cargo.toml + Cargo.lock)
- package-ecosystem: cargo
directory: "/"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: "Asia/Shanghai"
open-pull-requests-limit: 10
commit-message:
prefix: "chore: :arrow_up:"
groups:
# Tightly coupled async/HTTP stack: bump together to avoid intermediate
# incompatible Cargo.lock states between PRs.
web-stack:
patterns:
- "reqwest*"
- "hyper*"
- "tokio*"
- "tower*"
- "rustls*"
- "h2"
- "http*"
# Serialization stack
serde-stack:
patterns:
- "serde*"
- "toml*"

# GitHub Actions used in .github/workflows
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5
commit-message:
prefix: "chore: :arrow_up:"
ignore:
# release.yml is generated by cargo-dist, whose template pins
# actions/checkout@v6; bump it by upgrading cargo-dist instead.
- dependency-name: "actions/checkout"
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI

on:
pull_request:
push:
branches: [develop, main]

permissions:
contents: read

jobs:
check:
name: Test and lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run tests
run: cargo test
- name: Run clippy
run: cargo clippy --all-targets -- -D warnings
- name: Check formatting
run: cargo fmt --all --check
- name: Install cargo-deny
uses: taiki-e/install-action@cargo-deny
- name: Check dependency licenses
run: cargo deny check licenses
4 changes: 2 additions & 2 deletions .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
pull-requests: read
steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
cancel-in-progress: false
steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ src/
│ resolve_game_id / resolve_challenge_id (numeric ID, exact name, unique prefix)
├── cli.rs clap command tree + global flags (--json / --profile / --url / --token / --pager)
├── client.rs reqwest wrapper: /api/{path}, Bearer token, Set-Token refresh, streaming download, download_bytes
├── config.rs ~/.config/ret2cli/config.toml; atomic writes + file lock; [ui] section
├── config.rs user config dir per platform via dirs::config_dir() (Linux ~/.config, macOS ~/Library/Application Support, Windows %APPDATA%); atomic writes + file lock; [ui] section
├── error.rs CliError → exit codes: 1 config/serialization, 2 unauthenticated, 3 forbidden, 4 not found, 5 network/server
├── output.rs output capture + pager ($PAGER > [ui].pager > less -R > more), tabled tables, Markdown
└── commands/ auth / game / challenge / team / submission / interactive / local profile management
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ Ret2CLI 的所有重要变更将记录在此文件中。格式基于 [Keep a Cha

## [Unreleased]

## [2.0.0] - 2026-08-05 - TearJerker

### Added

- 交互模式启动横幅:`figlet` 大字体渲染 `Ret2CLI` 并带 `lolcat` 式彩虹渐变(纯 Rust 实现,跨平台,不依赖系统 figlet/lolcat 或外部字体;设置 `NO_COLOR` 或 `TERM=dumb`、stdout 非终端时显示无颜色版本)
- 在 Windows 构建中加入了资源头,包含 icon、名称、公司名称、注释、版权信息等

### Removed

- 移除弃用的 `game challenge start` / `stop` / `status` / `renew` 扁平子命令,请使用 `game challenge instance <action>`

## [1.1.0] - 2026-08-03 - Bloom in Two

### Added
Expand Down
11 changes: 6 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ git push origin feat/<name>

### 5. 发布流程

Ret2CLI 遵循 SemVer。`release-plz` 读取 Conventional Commits、维护版本与 CHANGELOG Release PR,并先将发布版本上传到 crates.io`cargo-dist` 随后创建同版本的 tag、GitHub Release 和三端二进制附件。
Ret2CLI 遵循 SemVer。`release-plz` 读取 Conventional Commits、维护版本 PR 并发布 crates.io(`release-plz.toml` 中 `changelog_update = false`,它不会改写 CHANGELOG.md);CHANGELOG 由维护者以项目风格手工维护。`cargo-dist` 随后创建同版本的 tag、GitHub Release 和三端二进制附件。

首次配置仓库时,维护者需要:

Expand All @@ -74,13 +74,14 @@ Ret2CLI 遵循 SemVer。`release-plz` 读取 Conventional Commits、维护版本

日常发布流程如下:

1. 变更合入 `develop` 后,`.github/workflows/release-plz.yml` 创建或更新面向 `develop` 的版本 PR。
2. 维护者审阅版本号和 CHANGELOG。同一 `major.minor` 发布线共用一个 codename;首次提升 minor 或 major 时,必须同时更新 `release.rs` 的映射、`dist-workspace.toml` 的展示名和 CHANGELOG 文案,否则构建会拒绝未知发布线
3. 版本 PR 合入 `develop` 后,从该提交切出 `release/vX.Y.Z`,完成最终验证并向 `main` 发起 PR。发布分支如有新修订,发布后也要合回或逐项 backport 到 `develop`
1. 变更合入 `develop` 后,`.github/workflows/release-plz.yml` 创建或更新面向 `develop` 的版本 PR。该 PR 只 bump `Cargo.toml` / `Cargo.lock`,不触碰 CHANGELOG。
2. 首次提升 minor 或 major 时,必须先把新发布线注册到 `release.rs`(映射 + 测试)并更新 `dist-workspace.toml` 的展示名,否则 `build.rs` 会拒绝未知发布线;该改动需要先于版本 PR 合入 `develop`
3. 维护者从版本 PR 的 head 提交切出 `release/vX.Y.Z`(版本 PR 暂不合入 `develop`),在发布分支上补写该版本的 CHANGELOG 章节(中文、手工条目,标题格式 `## [X.Y.Z] - YYYY-MM-DD - CODENAME`)并修复版本敏感的测试(如硬编码 codename 的断言),完成最终验证(`cargo test`、`cargo fmt --all --check`、`cargo clippy --all-targets -- -D warnings`、`cargo deny check licenses`;`dist plan` / `dist generate --check` 由 CI 的 `plan` 任务验证)后向 `main` 发起 PR
4. 发布 PR 合入 `main` 后,release-plz 将 `X.Y.Z` 发布到 crates.io,计算对应的 `vX.Y.Z`,但不自行创建 tag 或 GitHub Release;随后通过 `workflow_dispatch` 调用 cargo-dist 工作流。
5. cargo-dist 从 `main` 为 Windows x86_64、Linux x86_64/AArch64、macOS Intel/Apple Silicon 构建压缩包与校验文件,随后创建 tag 和 GitHub Release。
6. 确认 tag 已创建后,**最后**把版本 PR 合入 `develop`,随后把 `main` 合入 `develop`,同步发布分支上的修订并保持两条长期分支的历史对齐。整个发布窗口内 `develop` 应保持冻结——任何推送都会让 release-plz rebase 版本 PR。发布完成后,release-plz 会在 `develop` 出现新提交时自动为**下一个版本**开启 PR(即使只有 docs 变更也会提议补丁版本,如 1.1.1):该 PR 是下一次发布的起点,保持开启、不要关闭;准备发布时完成发布前准备后合入即可。

正常流程中不要手工推送版本 tag。若 crates.io 已发布但 cargo-dist 调度意外失败,维护者可从 `main` 手动 dispatch `Release` 工作流并填写同版本 tag;不得重复 bump 版本。已发布版本的紧急修复从 `main` 切出 `hotfix/*`,合入 `main` 发布后再同步到 `develop`。Winget、Scoop、Homebrew 等包管理器发布暂不属于本流程。
正常流程中不要手工推送版本 tag。若 crates.io 已发布但 cargo-dist 调度意外失败,维护者可从 `main` 手动 dispatch `Release` 工作流并填写同版本 tag;不得重复 bump 版本。若发布中途取消,把版本 PR 照常合入 `develop` 继续开发;在 tag 创建前 release-plz 会持续更新该版本 PR,属正常现象。已发布版本的紧急修复从 `main` 切出 `hotfix/*`,合入 `main` 发布后再同步到 `develop`。Winget、Scoop、Homebrew 等包管理器发布暂不属于本流程。

正式 CI 构建会在程序报告的 SemVer 后附加 `+build.<run_number>.<run_attempt>.g<short_sha>`;Cargo.toml 和 tag 仍只保存规范版本号,不提交构建元数据。

Expand Down
Loading