chore: release main (#271) #271
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: 'Rust SDK' | |
| on: | |
| push: | |
| branches: ['main'] | |
| pull_request: | |
| types: [opened, synchronize] | |
| paths: | |
| - 'sdk/highlight-rust/**' | |
| - '.github/workflows/rust-sdk.yml' | |
| defaults: | |
| run: | |
| working-directory: ./sdk/highlight-rust | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-22.04-8core-32gb | |
| if: github.event_name == 'pull_request' | |
| defaults: | |
| run: | |
| working-directory: ./sdk/highlight-rust | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install Rust toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - name: Build crates | |
| uses: katyo/publish-crates@v2 | |
| with: | |
| path: ./sdk/highlight-rust/ | |
| dry-run: true | |
| publish: | |
| name: Publish | |
| runs-on: ubuntu-22.04-8core-32gb | |
| if: github.event_name == 'push' | |
| defaults: | |
| run: | |
| working-directory: ./sdk/highlight-rust | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install Rust toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - name: Publish crates | |
| uses: katyo/publish-crates@v2 | |
| with: | |
| path: ./sdk/highlight-rust/ | |
| registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} |