-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
717a002
commit 8e1b2fc
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,30 @@ jobs: | |
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./target/doc | ||
|
||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- name: Checkout to repository | ||
uses: actions/checkout@v2 | ||
- name: Setup Rust toolchain | ||
uses: actions-rs/[email protected] | ||
with: | ||
toolchain: stable | ||
override: true | ||
- name: Install cargo-bump | ||
run: cargo install cargo-bump --force | ||
- name: Modify version with tag | ||
run: cargo bump ${{ github.ref_name }} | ||
- name: Automatic commit for crate version upgrade | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
branch: master | ||
commit_message: "Cargo: Update the crate version to ${{ github.ref_name }}" | ||
- name: Publish to crates.io | ||
uses: katyo/publish-crates@v1 | ||
with: | ||
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
|