Skip to content

Commit a307cad

Browse files
committed
Add release-plz for automatic releases.
This is what `cc-rs` is using and should create a release PR whenever a change to `master` is made. If the branch is merged, it should publish the new version.
1 parent 721e34b commit a307cad

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

.github/workflows/publish.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release-plz
2+
3+
permissions:
4+
pull-requests: write
5+
contents: write
6+
7+
on:
8+
push:
9+
branches:
10+
- master
11+
12+
jobs:
13+
release-plz:
14+
name: Release-plz
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
submodules: true
22+
- name: Install Rust (rustup)
23+
run: rustup update nightly --no-self-update && rustup default nightly
24+
- name: Publish `libm` as part of builtins, rather than its own crate
25+
run: rm libm/Cargo.toml
26+
- name: Run release-plz
27+
uses: MarcoIeni/release-plz-action@v0.5
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

crates/panic-handler/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ name = "panic-handler"
33
version = "0.1.0"
44
authors = ["Alex Crichton <alex@alexcrichton.com>"]
55
edition = "2021"
6+
publish = false
67

78
[dependencies]

testcrate/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "testcrate"
33
version = "0.1.0"
44
authors = ["Alex Crichton <alex@alexcrichton.com>"]
55
edition = "2021"
6+
publish = false
67

78
[lib]
89
test = false

0 commit comments

Comments
 (0)