This repository was archived by the owner on Mar 3, 2026. It is now read-only.
v1.18.0 #17
Workflow file for this run
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: | |
| release: | |
| types: [published] | |
| jobs: | |
| publish: | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| container: | |
| image: ghcr.io/mesa-dot-dev/sdk-rust-ci:latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| fetch-depth: 1 | |
| - name: Cache cargo registry and build | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Publish mesa_dev_oapi | |
| run: | | |
| OUTPUT=$(cargo publish -p mesa_dev_oapi 2>&1) && exit 0 | |
| echo "$OUTPUT" | |
| echo "$OUTPUT" | grep -q "already exists" && exit 0 | |
| exit 1 | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_API_KEY }} | |
| - name: Wait for crates.io index update | |
| run: sleep 30 | |
| - name: Publish mesa-dev | |
| run: cargo publish -p mesa-dev | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_API_KEY }} | |
| on-failure: | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| if: ${{ always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }} | |
| needs: | |
| - publish | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Slack Notification | |
| uses: rtCamp/action-slack-notify@v2 | |
| env: | |
| SLACK_USERNAME: mesa-gh | |
| SLACK_TITLE: Workflow ${{ needs.*.result }} | |
| MSG_MINIMAL: actions url | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} |