Skip to content

Commit 8bf57fd

Browse files
committed
ci: add release-plz config
1 parent 660633d commit 8bf57fd

File tree

3 files changed

+70
-1
lines changed

3 files changed

+70
-1
lines changed

.github/workflows/release-plz.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
permissions:
13+
contents: write
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
token: ${{ secrets.RELEASE_PLZ_TOKEN }}
20+
- name: Install Rust toolchain
21+
uses: dtolnay/rust-toolchain@stable
22+
- name: Run release-plz
23+
uses: release-plz/action@v0.5
24+
with:
25+
command: release
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
28+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
29+
30+
release-plz-pr:
31+
name: Release-plz PR
32+
runs-on: ubuntu-latest
33+
permissions:
34+
pull-requests: write
35+
contents: write
36+
concurrency:
37+
group: release-plz-${{ github.ref }}
38+
cancel-in-progress: false
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v4
42+
with:
43+
fetch-depth: 0
44+
token: ${{ secrets.RELEASE_PLZ_TOKEN }}
45+
- name: Install Rust toolchain
46+
uses: dtolnay/rust-toolchain@stable
47+
- name: Run release-plz
48+
uses: release-plz/action@v0.5
49+
with:
50+
command: release-pr
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
53+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.release-plz.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[workspace]
2+
pr_branch_prefix = "release-plz-" # PR branch prefix
3+
pr_name = "Release {{ package }} v{{ version }}" # template for the PR name
4+
pr_labels = ["release"] # add the `release` label to the release Pull Request
5+
6+
[[package]]
7+
name = "engcon"
8+
semver_check = true
9+
changelog_include = ["engcon_macros"]
10+
changelog_path = "CHANGELOG.md"
11+
12+
[[package]]
13+
name = "engcon_distillation"
14+
release = false # don't check the example

examples/distillation/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@ edition = "2021"
55
authors = ["Tim Janus <tim@janus.rs>"]
66
license = "MIT OR Apache-2.0"
77

8+
description = "A small example of using engcon for a distillation column"
9+
810
[dependencies]
9-
engcon = { path = "../../engcon", features = ["derive"] }
11+
engcon = { path = "../../engcon", features = ["derive"], version = "0.1" }

0 commit comments

Comments
 (0)