Skip to content

Commit 0e43bef

Browse files
authored
Merge pull request #2 from coderabbitai/codex/native-release-provenance
Stamp native release provenance
2 parents 6568430 + e6a599f commit 0e43bef

4 files changed

Lines changed: 20 additions & 4 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,21 @@ jobs:
4949
timeout-minutes: 90
5050
steps:
5151
- uses: actions/checkout@v6
52+
with:
53+
persist-credentials: false
5254

5355
- name: Build
56+
env:
57+
CELLD_BUILD_COMMIT: ${{ github.sha }}
5458
run: |
5559
set -euo pipefail
5660
rustup toolchain install "$RUST_VERSION" --profile minimal
5761
rustup default "$RUST_VERSION"
5862
cargo build --release --locked
5963
version=$(sed -n 's/^version = "\(.*\)"$/\1/p' crates/celld/Cargo.toml | head -1)
60-
target/release/celld --version | grep -F "$version"
64+
build_identity=$(target/release/celld --version)
65+
grep -F "$version" <<< "$build_identity"
66+
grep -F "$GITHUB_SHA" <<< "$build_identity"
6167
6268
- name: Package
6369
run: |
@@ -86,6 +92,8 @@ jobs:
8692
packages: read
8793
steps:
8894
- uses: actions/checkout@v6
95+
with:
96+
persist-credentials: false
8997

9098
- uses: docker/setup-buildx-action@v3
9199

@@ -120,6 +128,8 @@ jobs:
120128
attestations: write
121129
steps:
122130
- uses: actions/checkout@v6
131+
with:
132+
persist-credentials: false
123133

124134
- uses: actions/download-artifact@v4
125135
with:
@@ -209,6 +219,7 @@ jobs:
209219
- uses: actions/checkout@v6
210220
with:
211221
ref: ${{ github.event.release.tag_name }}
222+
persist-credentials: false
212223

213224
- name: Resolve and validate the release tag
214225
run: |
@@ -261,6 +272,7 @@ jobs:
261272
- uses: actions/checkout@v6
262273
with:
263274
ref: ${{ github.event.release.tag_name }}
275+
persist-credentials: false
264276

265277
- name: Resolve and validate the release tag
266278
run: |

‎Cargo.lock‎

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

‎crates/celld/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "celld"
3-
version = "0.2.1-coderabbit.1"
3+
version = "0.2.1-coderabbit.2"
44
edition = "2021"
55
rust-version = "1.94.1"
66
license = "Apache-2.0"

‎crates/celld/main.rs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4133,7 +4133,11 @@ async fn async_main(telemetry_config: Option<celld::telemetry::Config>) -> anyho
41334133
} else {
41344134
""
41354135
};
4136-
println!("celld {}{profile}", env!("CARGO_PKG_VERSION"));
4136+
let commit = option_env!("CELLD_BUILD_COMMIT").unwrap_or("unknown");
4137+
println!(
4138+
"celld {}{profile} (commit {commit})",
4139+
env!("CARGO_PKG_VERSION")
4140+
);
41374141
return Ok(());
41384142
}
41394143
Action::Diagnose {

0 commit comments

Comments
 (0)