diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8c12808 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,49 @@ +name: Manual Release + +# Manual workflow dispatch only +on: + workflow_dispatch: + +jobs: + release: + name: Manual Release to crates.io + runs-on: ubuntu-latest + environment: + name: release + url: https://crates.io/crates/rawsql + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust 1.81 + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: 1.81.0 + components: rustfmt, clippy + override: true + + - name: Verify rustc + run: rustc --version + + - name: Cache Cargo registry & target + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: cargo-cache-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} + + - name: Run CI checks + run: | + cargo fmt --all -- --check + cargo clippy --all-targets --all-features -- -D warnings + cargo test --all --all-features --verbose + cargo deny check licenses bans advisories sources + + - name: Publish to crates.io + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + run: cargo publish --allow-dirty diff --git a/Cargo.toml b/Cargo.toml index 0366d83..4d6ba4b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rawsql" -version = "0.1.1" +version = "0.2.0" authors = ["Manuel Alonso "] license = "MIT" description = "A rust library for reusing SQL" diff --git a/README.md b/README.md index d6529c7..7344a13 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # rawsql A rust library for *using* and *reusing* SQL. -[![Build Status](https://travis-ci.org/manute/rawsql.svg?branch=master)](https://travis-ci.org/manute/rawsql) [![Latest Version](https://img.shields.io/crates/v/rawsql.svg)](https://crates.io/crates/rawsql) +[![Latest Version](https://img.shields.io/crates/v/rawsql.svg)](https://crates.io/crates/rawsql) *is heavily influenced by [yesql](https://github.com/krisajenkins/yesql) (many thanks @krisajenkins)*