Set up release-plz (rust-lang/backtrace-rs#707)
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.
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 0000000..9d74db3
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,52 @@
+name: Release-plz
+
+permissions:
+ pull-requests: write
+ contents: write
+
+on:
+ push: { branches: [master] }
+
+jobs:
+ # Release unpublished packages.
+ release-plz-release:
+ name: Release-plz release
+ runs-on: ubuntu-24.04
+ if: ${{ github.repository_owner == 'rust-lang' }}
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - name: Install Rust toolchain
+ run: rustup update stable --no-self-update && rustup default stable
+ - name: Run release-plz
+ uses: release-plz/action@v0.5
+ with:
+ command: release
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
+
+ # Create a PR with the new versions and changelog, preparing the next release.
+ release-plz-pr:
+ name: Release-plz PR
+ runs-on: ubuntu-24.04
+ if: ${{ github.repository_owner == 'rust-lang' }}
+ concurrency:
+ group: release-plz-${{ github.ref }}
+ cancel-in-progress: false
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - name: Install Rust toolchain
+ run: rustup update stable --no-self-update && rustup default stable
+ - name: Run release-plz
+ uses: release-plz/action@v0.5
+ with:
+ command: release-pr
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
diff --git a/crates/cpp_smoke_test/Cargo.toml b/crates/cpp_smoke_test/Cargo.toml
index e1e51d9..4746ee0 100644
--- a/crates/cpp_smoke_test/Cargo.toml
+++ b/crates/cpp_smoke_test/Cargo.toml
@@ -4,6 +4,7 @@
authors = ["Nick Fitzgerald <fitzgen@gmail.com>"]
edition = "2021"
build = "build.rs"
+publish = false
[build-dependencies]
cc = "1.0"
diff --git a/crates/debuglink/Cargo.toml b/crates/debuglink/Cargo.toml
index 5e62abd..f832320 100644
--- a/crates/debuglink/Cargo.toml
+++ b/crates/debuglink/Cargo.toml
@@ -2,6 +2,7 @@
name = "debuglink"
version = "0.1.0"
edition = "2021"
+publish = false
[dependencies]
backtrace = { path = "../.." }
diff --git a/crates/line-tables-only/Cargo.toml b/crates/line-tables-only/Cargo.toml
index 4aa28f6..9cdd22b 100644
--- a/crates/line-tables-only/Cargo.toml
+++ b/crates/line-tables-only/Cargo.toml
@@ -2,6 +2,7 @@
name = "line-tables-only"
version = "0.1.0"
edition = "2021"
+publish = false
[build-dependencies]
cc = "1.0"
diff --git a/crates/macos_frames_test/Cargo.toml b/crates/macos_frames_test/Cargo.toml
index 849e764..cab83d0 100644
--- a/crates/macos_frames_test/Cargo.toml
+++ b/crates/macos_frames_test/Cargo.toml
@@ -3,6 +3,7 @@
version = "0.1.0"
authors = ["Aaron Hill <aa1ronham@gmail.com>"]
edition = "2021"
+publish = false
[dependencies.backtrace]
path = "../.."
diff --git a/crates/without_debuginfo/Cargo.toml b/crates/without_debuginfo/Cargo.toml
index b8c9394..37f10a6 100644
--- a/crates/without_debuginfo/Cargo.toml
+++ b/crates/without_debuginfo/Cargo.toml
@@ -3,6 +3,7 @@
version = "0.1.0"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
edition = "2021"
+publish = false
[dependencies.backtrace]
path = "../.."