diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c61b406..5c7cad2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -174,3 +174,22 @@ jobs: files: migrate-${{ matrix.target }}* env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + publish-crate: + if: needs.release.outputs.changed == 'true' && needs.release.outputs.tag_exists != 'true' + needs: release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + + - name: Cache cargo + uses: Swatinem/rust-cache@v2 + + - name: Publish to crates.io + run: cargo publish + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/Cargo.lock b/Cargo.lock index 78c4478..1f03a9e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -285,7 +285,7 @@ checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "migrate" -version = "0.3.1" +version = "0.3.2" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index f200cfd..15a526e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "migrate" -version = "0.3.1" +version = "0.3.2" edition = "2021" description = "Generic file migration tool for applying ordered transformations to a project directory" license = "MIT" diff --git a/README.md b/README.md index 8fa5382..89e1670 100644 --- a/README.md +++ b/README.md @@ -27,10 +27,16 @@ cargo install cargo-binstall cargo binstall migrate ``` -### Option 3: Build from source +### Option 3: cargo install Requires [Rust](https://rustup.rs): +```bash +cargo install migrate +``` + +### Option 4: Build from source + ```bash cargo install --git https://github.com/glideapps/migrate ```