Skip to content

Commit 674ceb3

Browse files
committed
feat: release v0.4.2 with library refactor, stronger CLI tests, and CI-gated publish flow
- Bump crate/docs version references to 0.4.2. - Refactor core generation logic from `src/bin/tauri-latest-json.rs` into `src/lib.rs`. - Keep binary as a thin CLI wrapper with backward-compatible `help`/`version` positional handling. - Add CLI integration tests in `tests/cli.rs` for help/version and non-TTY missing-arg failures. - Add docs.rs metadata and dev test dependencies in `Cargo.toml` (`assert_cmd`, `predicates`). - Expand README and changelog entries (CI-safe usage, root/src-tauri notes, troubleshooting). - Add `cargo publish --dry-run` to CI. - Wire publish workflow to run only after successful CI on version tags (remove duplicated checks from publish job).
1 parent 0391c72 commit 674ceb3

9 files changed

Lines changed: 1110 additions & 894 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- "**"
7+
tags:
8+
- "v*.*.*"
79
pull_request:
810

911
jobs:
@@ -30,3 +32,6 @@ jobs:
3032

3133
- name: Run verification suite
3234
run: make verify
35+
36+
- name: Check publish package (dry run)
37+
run: cargo publish --dry-run

.github/workflows/publish.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
name: Publish crate
22

33
on:
4-
push:
5-
tags:
6-
- "v*.*.*"
4+
workflow_run:
5+
workflows: ["CI"]
6+
types: [completed]
77

88
jobs:
99
publish:
10+
if: ${{ github.event.workflow_run.conclusion == 'success' && startsWith(github.event.workflow_run.ref, 'refs/tags/v') }}
1011
runs-on: ubuntu-latest
1112
permissions:
1213
contents: read
@@ -21,15 +22,6 @@ jobs:
2122
- name: Cache cargo
2223
uses: Swatinem/rust-cache@v2
2324

24-
- name: Check formatting
25-
run: cargo fmt --all -- --check
26-
27-
- name: Run clippy
28-
run: cargo clippy --all-targets --all-features -- -D warnings
29-
30-
- name: Run release verification suite
31-
run: make verify
32-
3325
- name: Publish to crates.io
3426
env:
3527
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

CHANGELOG.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,24 @@ All notable changes to this project are documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66

7-
## [0.4.1] - 2026-04-27
7+
## [0.4.2] - 2026-04-27
8+
9+
### Added
10+
11+
- [Internal] Added a library target and documented public API entrypoints to support docs.rs pages.
12+
- [Testing] Added CLI integration tests for `--help`, `help`, `--version`, `version`, and non-TTY missing-argument failures.
13+
14+
### Changed
15+
16+
- [Behavior] Refactored core generation logic from bin to library while preserving CLI behavior.
17+
- [Docs] Expanded README with CI-safe usage, root/`src-tauri` examples, and troubleshooting guidance.
18+
- [CI] Added `cargo publish --dry-run` to CI checks.
19+
- [Docs.rs] Enabled docs.rs metadata to build with all features.
820

921
### Fixed
1022

11-
- CI/Smoke test failures by adding TTY detection and handling `help`/`version` positional arguments.
12-
- Added `console` dependency for terminal detection.
23+
- [Behavior] CI/smoke test failures by adding TTY detection and handling `help`/`version` positional arguments.
24+
- [Dependency] Added `console` dependency for terminal detection.
1325

1426
## [0.4.0] - 2026-04-27
1527

Cargo.lock

Lines changed: 133 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tauri-latest-json"
3-
version = "0.4.1"
3+
version = "0.4.2"
44
authors = ["Aung Min Khant <aungminkhant.shay@gmail.com>"]
55
edition = "2021"
66
description = "Generate multi-platform Tauri updater latest.json from built installers"
@@ -11,6 +11,10 @@ keywords = ["tauri", "updater"]
1111
categories = ["command-line-utilities", "development-tools"]
1212
exclude = [".env", ".env.*", "scripts/", "Makefile", "SPEC.md", "real-tauri-app/"]
1313

14+
[package.metadata.docs.rs]
15+
all-features = true
16+
rustdoc-args = ["--cfg", "docsrs"]
17+
1418
[dependencies]
1519
serde = { version = "1.0", features = ["derive"] }
1620
serde_json = "1.0"
@@ -23,6 +27,10 @@ colored = "2.1"
2327
dialoguer = "0.11"
2428
console = "0.15"
2529

30+
[dev-dependencies]
31+
assert_cmd = "2.0"
32+
predicates = "3.1"
33+
2634
[features]
2735
default = []
2836
verify-signature = []

README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ Just run the command from your Tauri project root. It will prompt you for the do
4848
tauri-latest-json
4949
```
5050

51+
You can also run from `src-tauri` and the tool will still auto-detect config and bundle paths.
52+
5153
### 2. Command Line Arguments
5254

5355
Provide the download URL base and release notes directly:
@@ -59,10 +61,31 @@ tauri-latest-json <download_url_base> <notes...>
5961
**Example:**
6062

6163
```bash
62-
tauri-latest-json https://github.com/user/repo/releases/download/v0.4.1 "Fixed security vulnerabilities and improved performance."
64+
tauri-latest-json https://github.com/user/repo/releases/download/v0.4.2 "Fixed security vulnerabilities and improved performance."
65+
```
66+
67+
### 3. CI-safe Non-interactive Usage
68+
69+
Use fully non-interactive arguments in CI/CD so jobs fail fast instead of waiting for prompts:
70+
71+
```bash
72+
tauri-latest-json "https://github.com/user/repo/releases/download/v0.4.2" "Release notes from CI"
73+
```
74+
75+
### 4. Root vs src-tauri
76+
77+
Both run modes are supported:
78+
79+
```bash
80+
# From project root
81+
tauri-latest-json "https://example.com/downloads" "release notes"
82+
83+
# From src-tauri
84+
cd src-tauri
85+
tauri-latest-json "https://example.com/downloads" "release notes"
6386
```
6487

65-
### 3. What happens next?
88+
### 5. What happens next?
6689

6790
The tool will:
6891

@@ -117,6 +140,13 @@ make smoke-real-app
117140
REAL_APP_DIR=/path/to/your-app ./scripts/smoke-real-tauri-app.sh
118141
```
119142

143+
## Troubleshooting
144+
145+
- `Could not detect bundle dir`: Build your app first so `target/*/bundle` exists.
146+
- `No public key found in tauri.conf.json`: Ensure updater pubkey is set in `plugins.updater.pubkey` (Tauri 2) or `tauri.updater.pubkey` (Tauri 1).
147+
- `Signature not found for platform ...`: Ensure `.sig` exists for updater artifacts. `.dmg` is expected to be skipped.
148+
- `Argument '...' missing and not in a terminal`: Provide full CLI args in CI/non-TTY environments.
149+
120150
## License
121151

122152
MIT — see [LICENSE](LICENSE).

0 commit comments

Comments
 (0)