From ce3ce07da71dd2114d4efe06f22e82924504499e Mon Sep 17 00:00:00 2001 From: spencerwooo Date: Mon, 27 Nov 2023 19:15:32 +0800 Subject: [PATCH] add crates.io release --- .github/workflows/ci.yml | 9 +++++++++ README.md | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9913d8b..a213f14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,3 +28,12 @@ jobs: - name: Run cargo check run: cargo check --all-targets + + - name: Publish to crates.io if new release + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + shell: bash + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + run: | + cargo login "$CARGO_REGISTRY_TOKEN" + cargo publish diff --git a/README.md b/README.md index b84cfe0..f171270 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ ## Usage -```shell -❯ bitsrun help +```console +$ bitsrun help A headless login and logout CLI app for 10.0.0.55 at BIT Usage: bitsrun [OPTIONS] [COMMAND] @@ -31,4 +31,4 @@ Options: ## License -[MIT](./LICENSE). +[MIT](./LICENSE)