Skip to content

Commit

Permalink
github: workflows: Add automatic crates.io deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
RaulTrombin authored and patrickelectric committed Jul 14, 2023
1 parent 78560d2 commit 3209874
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,29 @@ 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 }}

0 comments on commit 3209874

Please sign in to comment.