crates.io pub #1
This file contains hidden or 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
| name: Publish to crates.io | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| crate: | |
| description: "Which crate to publish?" | |
| required: true | |
| type: choice | |
| options: | |
| - wingfoil | |
| - wingfoil-python | |
| - both | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Publish wingfoil | |
| if: ${{ github.event.inputs.crate == 'wingfoil' || github.event.inputs.crate == 'both' }} | |
| working-directory: wingfoil | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }} | |
| run: cargo publish | |
| - name: Publish wingfoil-python | |
| if: ${{ github.event.inputs.crate == 'wingfoil-python' || github.event.inputs.crate == 'both' }} | |
| working-directory: wingfoil-python | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} | |
| run: cargo publish |