Skip to content

Commit bd2811b

Browse files
authored
Merge pull request #386 from ehuss/publish
Add a publishing workflow
2 parents 5d56145 + 6059aee commit bd2811b

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/workflows/publish.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish
2+
on:
3+
release:
4+
types: [created]
5+
6+
defaults:
7+
run:
8+
shell: bash
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
publish:
15+
name: Publish to crates.io
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Install Rust (rustup)
20+
run: rustup update stable --no-self-update && rustup default stable
21+
- name: Publish
22+
env:
23+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
24+
run: cargo publish --no-verify

MAINTAINING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Maintaining cargo-bisect-rustc
2+
3+
## Publishing
4+
5+
To publish a new release:
6+
7+
1. Create a PR to bump the version in `Cargo.toml` and `Cargo.lock`, and update [`CHANGELOG.md`](CHANGELOG.md).
8+
2. After the merge is complete, create a new release. There are two approaches:
9+
- GUI: Create a new release in the UI, tag and title should be `v` and the version number. Copy a link to the changelog.
10+
- CLI: Run the following in the repo:
11+
```bash
12+
VERSION="`cargo read-manifest | jq -r .version`" ; \
13+
gh release create -R rust-lang/cargo-bisect-rustc v$VERSION \
14+
--title v$VERSION \
15+
--notes "See https://github.com/rust-lang/cargo-bisect-rustc/blob/master/CHANGELOG.md#v${VERSION//.} for a complete list of changes."
16+
```

0 commit comments

Comments
 (0)