From b3b5d457cb4b17a6a4c7ae9e14ea7e0273ca80c2 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Fri, 7 Oct 2022 14:39:14 -0400 Subject: [PATCH] Add cargo publish job for rustworkx-core This commit adds a CI job to automatically publish rustworkx-core to crates.io on releases. In the past I have just manually run cargo publish locally but this is error prone and depends on me doing the correct thing. Having it run automatically in CI limits the chances of something going wrong. --- .github/workflows/wheels.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 2b1e02c90..14cdf2c23 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -5,6 +5,21 @@ on: tags: - '*' jobs: + rustworkx-core: + name: Publish rustworkx-core + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Run cargo publish + run: | + cd rustworkx-core + cargo publish + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} sdist: name: Build sdist runs-on: ubuntu-latest