diff --git a/.github/workflows/publish-crate.yaml b/.github/workflows/publish-crate.yaml new file mode 100644 index 0000000..048ecc2 --- /dev/null +++ b/.github/workflows/publish-crate.yaml @@ -0,0 +1,24 @@ +name: publish-crate +on: + release: + types: + - released + workflow_dispatch: + +jobs: + publish-to-crates-io: + name: Publish to crates.io + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + + - name: Run cargo publish + uses: katyo/publish-crates@v2 + with: + registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}