From a0021840af74347944e6ff75b7e9372b6d345195 Mon Sep 17 00:00:00 2001 From: Igor Artamonov Date: Sat, 13 May 2023 22:27:00 -0400 Subject: [PATCH] solution: CI task to publish a release to crates registry --- .github/workflows/publish.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..f36b4dd --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,27 @@ +name: Publish +on: + release: + types: [created] + +jobs: + + publish-crates: + runs-on: ubuntu-latest + steps: + - name: Checkout the code + uses: actions/checkout@v2 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Publish to Crates + uses: actions-rs/cargo@v1 + with: + command: publish + args: --token ${{ secrets.CRATES_TOKEN }} + env: + RUST_BACKTRACE: "1"