Skip to content

Commit 20ff42a

Browse files
committed
Set up release-plz
Add a release-plz workflow and ensure that all unneeded packages are marked `publish = false`. We should get both the release PRs and the automatic publish on version changes.
1 parent b70de06 commit 20ff42a

File tree

6 files changed

+57
-0
lines changed

6 files changed

+57
-0
lines changed

.github/workflows/publish.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Release-plz
2+
3+
permissions:
4+
pull-requests: write
5+
contents: write
6+
7+
on:
8+
push: { branches: [master] }
9+
10+
jobs:
11+
# Release unpublished packages.
12+
release-plz-release:
13+
name: Release-plz release
14+
runs-on: ubuntu-24.04
15+
if: ${{ github.repository_owner == 'rust-lang' }}
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
- name: Install Rust toolchain
22+
run: rustup update stable --no-self-update && rustup default stable
23+
- name: Run release-plz
24+
uses: release-plz/[email protected]
25+
with:
26+
command: release
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
30+
31+
# Create a PR with the new versions and changelog, preparing the next release.
32+
release-plz-pr:
33+
name: Release-plz PR
34+
runs-on: ubuntu-24.04
35+
if: ${{ github.repository_owner == 'rust-lang' }}
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+
- name: Install Rust toolchain
45+
run: rustup update stable --no-self-update && rustup default stable
46+
- name: Run release-plz
47+
uses: release-plz/[email protected]
48+
with:
49+
command: release-pr
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

crates/cpp_smoke_test/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ version = "0.1.0"
44
authors = ["Nick Fitzgerald <[email protected]>"]
55
edition = "2021"
66
build = "build.rs"
7+
publish = false
78

89
[build-dependencies]
910
cc = "1.0"

crates/debuglink/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "debuglink"
33
version = "0.1.0"
44
edition = "2021"
5+
publish = false
56

67
[dependencies]
78
backtrace = { path = "../.." }

crates/line-tables-only/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "line-tables-only"
33
version = "0.1.0"
44
edition = "2021"
5+
publish = false
56

67
[build-dependencies]
78
cc = "1.0"

crates/macos_frames_test/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "macos_frames_test"
33
version = "0.1.0"
44
authors = ["Aaron Hill <[email protected]>"]
55
edition = "2021"
6+
publish = false
67

78
[dependencies.backtrace]
89
path = "../.."

crates/without_debuginfo/Cargo.toml

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

78
[dependencies.backtrace]
89
path = "../.."

0 commit comments

Comments
 (0)