diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e72c328..b86fbc9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,4 +16,21 @@ jobs: - uses: actions/checkout@v4 - run: rustup update stable && rustup default stable - run: cargo build --verbose - - run: cargo test --verbose \ No newline at end of file + - run: cargo test --verbose + + publish: + name: Publish to crates.io + if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }} + runs-on: ubuntu-latest + + steps: + - name: Publish + - uses: actions/checkout@v4 + - run: rustup update stable && rustup default stable + - run: > + cargo publish + --dry-run + --verbose + --locked + --token ${{ secrets.CARGO_REGISTRY_TOKEN }} + \ No newline at end of file