Skip to content

Publish libosdp-sys

Publish libosdp-sys #3

#
# 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 libosdp-sys 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:
needs: [cross_platform_check]
name: Publish libosdp-sys
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: cargo publish --token ${CRATES_TOKEN} -p libosdp-sys
env:
CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
REL_TAG: ${{ github.ref_name }}