Skip to content

Commit

Permalink
Add publish github action. (#5)
Browse files Browse the repository at this point in the history
* Add publish github action.

* 2 spaces

* Update .github/workflows/publish.yml

Co-authored-by: Oleksii Shmalko <[email protected]>

* Update .github/workflows/publish.yml

Co-authored-by: Oleksii Shmalko <[email protected]>

* Update .github/workflows/publish.yml

Co-authored-by: Oleksii Shmalko <[email protected]>

---------

Co-authored-by: Oleksii Shmalko <[email protected]>
  • Loading branch information
leoromanovsky and rasendubi authored May 16, 2024
1 parent 7201d04 commit 8079aac
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish Crate

on:
release:
types: [published]

env:
CARGO_TERM_COLOR: always

jobs:
publish:
name: Publish to Crates.io
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Build Release
run: cargo build --release --verbose
- name: Test
run: cargo test --verbose
- name: Docs
run: cargo doc --verbose
- name: Publish
run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}

0 comments on commit 8079aac

Please sign in to comment.