diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 206302c..24a34e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,3 +41,19 @@ jobs: with: context: . push: false + + release: + name: Publish on crates.io + runs-on: ubuntu-latest + if: "startsWith(github.ref, 'refs/tags/')" + needs: [test] + steps: + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + + - name: Publish on crates.io + run: | + cargo login ${{ secrets.CRATES_TOKEN }} + cargo publish