Skip to content

Commit

Permalink
Add release-plz for automatic releases.
Browse files Browse the repository at this point in the history
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.

Includes configuration to disable semver checks and not keep a changelog
since this is an implementation detail.
  • Loading branch information
tgross35 committed Jul 27, 2024
1 parent 721e34b commit 1cc3bc4
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release-plz

permissions:
pull-requests: write
contents: write

on:
push:
branches:
- master

jobs:
release-plz:
name: Release-plz
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Install Rust (rustup)
run: rustup update nightly --no-self-update && rustup default nightly
- name: Publish `libm` as part of builtins, rather than its own crate
run: rm libm/Cargo.toml
- name: Run release-plz
uses: MarcoIeni/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
3 changes: 3 additions & 0 deletions .release-plz.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[workspace]
changelog_update = false
semver_check = false
1 change: 1 addition & 0 deletions crates/panic-handler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ name = "panic-handler"
version = "0.1.0"
authors = ["Alex Crichton <[email protected]>"]
edition = "2021"
publish = false

[dependencies]
1 change: 1 addition & 0 deletions testcrate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "testcrate"
version = "0.1.0"
authors = ["Alex Crichton <[email protected]>"]
edition = "2021"
publish = false

[lib]
test = false
Expand Down

0 comments on commit 1cc3bc4

Please sign in to comment.