diff --git a/.github/workflows/crates.yaml b/.github/workflows/crates.yaml index ba244f8..d9a4774 100644 --- a/.github/workflows/crates.yaml +++ b/.github/workflows/crates.yaml @@ -25,6 +25,20 @@ jobs: - name: Cargo test run: cargo test + publish: + runs-on: ubuntu-latest + needs: test + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + + steps: + - uses: actions/checkout@v2 + + - name: Install Rust + uses: actions-rs/toolchain@v1.0.7 + with: + toolchain: stable + override: true + - name: Cargo publish if: github.event_name == 'push' && github.ref == 'refs/heads/main' - run: cargo publish || true + run: cargo publish -p rustfinity