Skip to content

Commit 8380c4e

Browse files
authored
feat: use release-plz (#45)
* Edit tomls * Add workflow * Add cfg
1 parent 624306b commit 8380c4e

File tree

5 files changed

+85
-37
lines changed

5 files changed

+85
-37
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,4 @@ jobs:
3232
id: toolchain
3333
with:
3434
toolchain: ${{matrix.rust}}
35-
- name: Cache cargo registry
36-
uses: actions/cache@v4
37-
with:
38-
path: ~/.cargo/registry
39-
key: ${{ runner.os }}-cargo-registry-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }}
40-
restore-keys: |
41-
${{ runner.os }}-cargo-registry-${{ steps.toolchain.outputs.cachekey }}-
42-
${{ runner.os }}-cargo-registry-
43-
44-
- name: Cache cargo git index
45-
uses: actions/cache@v4
46-
with:
47-
path: ~/.cargo/git
48-
key: ${{ runner.os }}-cargo-git-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }}
49-
restore-keys: |
50-
${{ runner.os }}-cargo-git-${{ steps.toolchain.outputs.cachekey }}-
51-
${{ runner.os }}-cargo-git-
52-
53-
- name: Cache target directory
54-
uses: actions/cache@v4
55-
with:
56-
path: target
57-
key: ${{ runner.os }}-target-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }}
58-
restore-keys: |
59-
${{ runner.os }}-target-${{ steps.toolchain.outputs.cachekey }}-
60-
${{ runner.os }}-target-
6135
- run: cargo build --all-features --manifest-path crackers/Cargo.toml

.github/workflows/release-plz.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Release-plz
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release-plz-release:
10+
name: Release-plz release
11+
runs-on: ubuntu-latest
12+
if: ${{ github.repository_owner == 'toolCHAINZ' }}
13+
permissions:
14+
contents: write
15+
id-token: write
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
token: ${{ secrets.RELEASE_PLZ_TOKEN }}
22+
- name: Install Rust toolchain
23+
uses: dtolnay/rust-toolchain@stable
24+
- name: Authenticate with crates.io
25+
uses: rust-lang/crates-io-auth-action@v1
26+
id: auth
27+
- name: Run release-plz
28+
uses: release-plz/[email protected]
29+
with:
30+
command: release
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
33+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
34+
35+
release-plz-pr:
36+
name: Release-plz PR
37+
runs-on: ubuntu-latest
38+
if: ${{ github.repository_owner == 'toolCHAINZ' }}
39+
permissions:
40+
pull-requests: write
41+
contents: write
42+
concurrency:
43+
group: release-plz-${{ github.ref }}
44+
cancel-in-progress: false
45+
steps:
46+
- name: Checkout repository
47+
uses: actions/checkout@v4
48+
with:
49+
fetch-depth: 0
50+
token: ${{ secrets.RELEASE_PLZ_TOKEN }}
51+
- name: Install Rust toolchain
52+
uses: dtolnay/rust-toolchain@stable
53+
- name: Run release-plz
54+
uses: release-plz/[email protected]
55+
with:
56+
command: release-pr
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}

crackers/Cargo.toml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
[package]
22
name = "crackers"
3-
version = "0.1.0"
3+
version = "0.1.1"
4+
authors = ["toolCHAINZ"]
5+
license = "MIT"
6+
rust-version = "1.85.0"
7+
homepage = "https://github.com/toolCHAINZ/crackers"
8+
repository = "https://github.com/toolCHAINZ/crackers"
9+
description = "A tool for synthesizing Code Reuse Attacks (ROP chains) using Ghidra's p-code and Z3"
410
edition = "2024"
5-
11+
keywords = ["rop"]
612
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
713

814
[[bin]]
@@ -14,11 +20,11 @@ default = ["toml"]
1420
bin = ["dep:tracing-subscriber", "toml", "dep:clap", "dep:anyhow", "dep:tracing-indicatif"]
1521
pyo3 = ["dep:pyo3", "jingle/pyo3"]
1622
toml = ["dep:toml_edit"]
17-
bundled = ["z3/bundled"]
23+
z3-gh-release = ["z3/gh-release"]
1824

1925
[dependencies]
20-
jingle = { git = "https://github.com/toolCHAINZ/jingle", branch = "main", features = ["gimli"] }
21-
z3 = { git = "https://github.com/prove-rs/z3.rs.git", branch = "master" }
26+
jingle = { version = "0.1.2", features = ["gimli"] }
27+
z3 = "0.13.1"
2228
serde = { version = "1.0.203", features = ["derive"] }
2329
thiserror = "2.0"
2430
tracing = "0.1"

crackers_python/Cargo.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
[package]
22
name = "crackers_python"
3-
version = "0.1.0"
3+
version = "0.1.1"
4+
license = "MIT"
45
edition = "2024"
5-
6+
description = "pyo3 bindings for crackers"
67
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
78
[lib]
89
name = "crackers"
910
crate-type = ["cdylib"]
1011

1112
[dependencies]
1213
pyo3 = { version = "0.24", features = ["extension-module", "py-clone"] }
13-
crackers = {path = "../crackers", features = ["pyo3"]}
14-
jingle = {git = "https://github.com/toolCHAINZ/jingle.git", branch = "main", features = ["pyo3"]}
14+
crackers = {path = "../crackers", features = ["pyo3"], version = "0.1.1"}
15+
jingle = {version = "0.1.2", features = ["pyo3"]}
1516
toml_edit = "0.22.22"
16-
z3 = { git = "https://github.com/prove-rs/z3.rs.git", branch = "master" }
17+
z3 = "0.13.0"
1718
serde_json = "1.0.140"
1819

1920
[dev-dependencies]
2021
pyo3 = { version = "0.24", features = ["extension-module"] }
21-
z3 = { git = "https://github.com/prove-rs/z3.rs.git", branch = "master" }
22+
z3 = "0.13.0"

release-plz.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[workspace]
2+
pr_branch_prefix = "release-plz-" # PR branch prefix
3+
pr_labels = ["release"] # add the `release` label to the release Pull Request
4+
5+
[[package]] # the double square brackets define a TOML table array
6+
name = "crackers_python"
7+
publish = false # disable `cargo publish` for `package_a`
8+
git_release_enable = false
9+
git_tag_enable = false

0 commit comments

Comments
 (0)