diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41b3871..66f5835 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,7 @@ name: Rust CI on: push: branches: ["main"] + tags: ["v*"] pull_request: types: [opened, synchronize, reopened] @@ -49,3 +50,16 @@ jobs: profile: minimal toolchain: stable - run: cargo doc --all-features --no-deps + + publish: + name: publish on crates.io + needs: + - rustfmt + - clippy + - test + - doc + if: ${{ startsWith(github.ref, 'refs/tags/v') }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: cargo publish -p jsonpath-rust --token ${{ secrets.CRATES_IO_TOKEN }}