From 99a84aaef2c9237d7421fa3b4151a9061328367d Mon Sep 17 00:00:00 2001 From: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> Date: Sat, 4 Apr 2026 23:23:32 -0400 Subject: [PATCH] ci: configure job to publish to crates.io (#2009) * ci: configure job to publish to crates.io * make this run last * pin version --- .github/ci/rust_version.txt | 2 +- .github/workflows/post_release.yml | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/ci/rust_version.txt b/.github/ci/rust_version.txt index 8db4a57b..df83a51c 100644 --- a/.github/ci/rust_version.txt +++ b/.github/ci/rust_version.txt @@ -1 +1 @@ -1.94.0 +1.94.1 diff --git a/.github/workflows/post_release.yml b/.github/workflows/post_release.yml index 2ce584a0..fa3ff210 100644 --- a/.github/workflows/post_release.yml +++ b/.github/workflows/post_release.yml @@ -97,3 +97,22 @@ jobs: -H 'Accept: application/vnd.github.everest-preview+json' \ -u ${{ secrets.BOTTOM_PACKAGE_DEPLOYMENT }} \ --data '{ "event_type": "update", "client_payload": { "version": "'"$RELEASE_VERSION"'" } }' + + publish-crate: + needs: [initialize, chocolatey, publish-gh-pages] + runs-on: ubuntu-24.04 + environment: production + permissions: + id-token: write + steps: + - name: Checkout repository + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + fetch-depth: 0 + + - uses: rust-lang/crates-io-auth-action@bbd81622f20ce9e2dd9622e3218b975523e45bbe # v1.0.4 + id: auth + + - run: cargo publish + env: + CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}