diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0427b6a1..ce0c603e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -331,6 +331,27 @@ jobs: - name: Check versions are consistent run: ./s/check-version + publish-crates: + if: startsWith(github.ref, 'refs/tags/') + needs: [build] + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Toolchain + uses: dtolnay/rust-toolchain@4305c38b25d97ef35a8ad1f985ccf2d2242004f2 # stable + with: + toolchain: 1.90.0 + + - name: Cache + uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # pin@v2 + + - name: Publish to crates.io + run: cargo publish --workspace + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} + publish-vscode: if: startsWith(github.ref, 'refs/tags/') needs: [build]