Skip to content

Publish libosdp-sys

Publish libosdp-sys #7

#
# 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:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-latest, macos-13, macos-14, windows-latest]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
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@v3
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: "Publish crate"
run: |
cargo publish --token ${CRATES_TOKEN} -p libosdp-sys
env:
CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}