Skip to content

Commit 812f5c7

Browse files
rwdaigleclaude
andauthored
Add crates.io publishing to release workflow (#12)
* Add crates.io publishing to release workflow Automatically publish to crates.io when version changes on main. Also add cargo install as the simplest installation option for users with Rust. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * Bump version to 0.3.2 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
1 parent 42555fa commit 812f5c7

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,3 +174,22 @@ jobs:
174174
files: migrate-${{ matrix.target }}*
175175
env:
176176
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
177+
178+
publish-crate:
179+
if: needs.release.outputs.changed == 'true' && needs.release.outputs.tag_exists != 'true'
180+
needs: release
181+
runs-on: ubuntu-latest
182+
steps:
183+
- name: Checkout
184+
uses: actions/checkout@v4
185+
186+
- name: Setup Rust
187+
uses: dtolnay/rust-toolchain@stable
188+
189+
- name: Cache cargo
190+
uses: Swatinem/rust-cache@v2
191+
192+
- name: Publish to crates.io
193+
run: cargo publish
194+
env:
195+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "migrate"
3-
version = "0.3.1"
3+
version = "0.3.2"
44
edition = "2021"
55
description = "Generic file migration tool for applying ordered transformations to a project directory"
66
license = "MIT"

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,16 @@ cargo install cargo-binstall
2727
cargo binstall migrate
2828
```
2929

30-
### Option 3: Build from source
30+
### Option 3: cargo install
3131

3232
Requires [Rust](https://rustup.rs):
3333

34+
```bash
35+
cargo install migrate
36+
```
37+
38+
### Option 4: Build from source
39+
3440
```bash
3541
cargo install --git https://github.com/glideapps/migrate
3642
```

0 commit comments

Comments
 (0)