Publish on crates.io #73
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is triggered after the Release workflow successfully completes its run | |
on: | |
workflow_run: | |
workflows: | |
- Release | |
types: | |
- completed | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
jobs: | |
cargo-publish: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: Publish bindgen (lib) | |
run: cargo publish --package bindgen --token ${CARGO_REGISTRY_TOKEN} | |
- name: Publish bindgen-cli | |
run: cargo publish --package bindgen-cli --token ${CARGO_REGISTRY_TOKEN} |