Skip to content

Commit 6650d39

Browse files
committed
README: document the changelog action, fix an artifacts typo
1 parent c348360 commit 6650d39

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

‎README.md‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,21 @@ A crate with `publish = false` is validated for tag/version coherence only, so t
4848
# expected-version: 1.2.3 # defaults to the pushed v* tag
4949
```
5050

51+
### `changelog`
52+
53+
Keeps a [Keep a Changelog](https://keepachangelog.com) `CHANGELOG.md` coherent with the crate's declared version.
54+
`mode: check` gates a pull request: entries under `[Unreleased]` require the crate version to exceed the last released baseline (the greatest `vX.Y.Z` tag by default, so fetch tags), and a `**Breaking:**` entry requires more than a patch bump.
55+
`mode: cut` turns `[Unreleased]` into the released section for the crate's version, rewrites the `.../compare/<prev>...HEAD` link, and exports `CHANGELOG_VERSION` for later steps.
56+
57+
```yaml
58+
- uses: actions/checkout@v6
59+
with:
60+
fetch-depth: 0 # the check derives its baseline from the tags
61+
- uses: gronke/rust-ci/.github/actions/changelog@main
62+
with:
63+
mode: check # or: cut (stamps today's date unless `date` is set)
64+
```
65+
5166
### `rust-cache`
5267

5368
Caches cargo for CI and **defaults** incremental compilation off — pure cost in CI (no edit→recompile loop), and the main thing that balloons `target/`.
@@ -237,7 +252,7 @@ The actions are therefore exercised end-to-end before any consumer relies on the
237252

238253
## Motivation
239254

240-
GitHub Actions have huge potential for supply-chain attacks. Repeating the same setup across repositories was tedious or required using and combining various other third-party actions, none of which is hardened against malicious build.rs scripts in test-dependencies, that potentially receive less attention than the release dependency tree. What purpose does it have to execute both in the same job context? As Archer would say: "That's how you get ants". Given how quick Rust build caches can grow and how time-consuming it can be to pass artifcats between jobs, Docker is available in GitHub Actions and provides easier means of compartmentalization.
255+
GitHub Actions have huge potential for supply-chain attacks. Repeating the same setup across repositories was tedious or required using and combining various other third-party actions, none of which is hardened against malicious build.rs scripts in test-dependencies, that potentially receive less attention than the release dependency tree. What purpose does it have to execute both in the same job context? As Archer would say: "That's how you get ants". Given how quick Rust build caches can grow and how time-consuming it can be to pass artifacts between jobs, Docker is available in GitHub Actions and provides easier means of compartmentalization.
241256
The Docker actions take that further: a build runs sealed — non-root, all capabilities dropped, no privilege escalation, and `--network=none` against a cache a separate `cargo-fetch` warmed — so a dependency `build.rs` or proc-macro compiles but cannot reach the network. `cargo-fetch` is the one networked step; `publish-dry-run` keeps that same seal around the verify-build (`cargo package`), where dependency code is otherwise executed during a release — while the publish checks, which run no build, keep the network.
242257

243258
## Status and licence

0 commit comments

Comments
 (0)