-
-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (46 loc) · 1.16 KB
/
publish-libosdp-sys.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#
# 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 }}