should bump to version specified by --new-version if present (#3)

* update Cargo.lock

* better error message when failed to get current version from config

* should bump to version specified by --new-version if present

* fix: update docs && add CI

---------

Co-authored-by: 莫仲华 <mozhonghua@qiyi.com>
This commit is contained in:
Mo Zhonghua 2024-11-14 11:56:12 +08:00 committed by GitHub
parent 2b75ff6ce4
commit 017a228f6b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 99 additions and 57 deletions

11
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "cargo" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

22
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,22 @@
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose

28
.github/workflows/clippy.yml vendored Executable file
View file

@ -0,0 +1,28 @@
name: Rust Clippy Check
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
clippy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
- name: Run clippy
run: cargo clippy -- -D warnings

28
.github/workflows/rustfmt.yml vendored Executable file
View file

@ -0,0 +1,28 @@
name: Rust Format Check
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
- name: Run rustfmt
run: cargo fmt -- --check