Publish libosdp-sys #13
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
| # | |
| # Copyright (c) 2024 Siddharth Chandrasekaran <sidcha.dev@gmail.com> | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| # | |
| name: Publish libosdp-sys | |
| on: | |
| workflow_dispatch: | |
| push: | |
| # Sequence of patterns matched against refs/tags | |
| tags: | |
| - 'libosdp-sys-v*' | |
| jobs: | |
| cross_platform_check: | |
| name: Build crate on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-15-intel, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1.9.0 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - run: cargo build -p libosdp-sys | |
| publish: | |
| name: Publish Crate | |
| needs: [cross_platform_check] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1.9.0 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - name: Check semver | |
| uses: obi1kenobi/cargo-semver-checks-action@v2 | |
| with: | |
| package: libosdp-sys | |
| - name: "Publish crate" | |
| run: | | |
| cargo publish --token ${CRATES_TOKEN} -p libosdp-sys | |
| env: | |
| CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |