Skip to content

Commit

Permalink
add crates.io release
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerwooo committed Nov 27, 2023
1 parent cd9e4a7 commit 2d9a53a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
workflow_dispatch:

Expand All @@ -28,3 +30,11 @@ jobs:

- name: Run cargo check
run: cargo check --all-targets

- name: Publish to crates.io if new release
if: startsWith(github.ref, 'refs/tags/v')
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
cargo login "$CARGO_REGISTRY_TOKEN"
cargo publish
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ homepage = "https://github.com/spencerwooo/bitsrun-rs"
documentation = "https://github.com/spencerwooo/bitsrun-rs"
repository = "https://github.com/spencerwooo/bitsrun-rs"
readme = "README.md"
keywords = ["bit", "bitsrun", "srun", "srun-client", "srun-login", "beijing-institute-of-technology"]
keywords = ["bit", "bitsrun", "srun", "srun-client", "srun-login"]
categories = ["command-line-utilities"]

[dependencies]
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -31,4 +31,4 @@ Options:

## License

[MIT](./LICENSE).
[MIT](./LICENSE)

0 comments on commit 2d9a53a

Please sign in to comment.