-
Notifications
You must be signed in to change notification settings - Fork 16
69 lines (58 loc) · 2.04 KB
/
release-wasmedge-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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Release wasmedge-sys crate
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
wasmedge_version:
description: "Version of WasmEdge"
required: true
type: string
jobs:
release_wasmedge_sys:
name: Release wasmedge-sys crate
runs-on: ubuntu-22.04
container:
image: wasmedge/wasmedge:ubuntu-build-clang
steps:
- name: Checkout WasmEdge Rust SDK
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up build environment
run: |
apt update
apt install -y software-properties-common libboost-all-dev ninja-build
apt install -y llvm-15-dev liblld-15-dev
- name: Install WasmEdge
run: |
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v ${{ inputs.wasmedge_version }} -p /usr/local
ldconfig
- name: Install Rust-nightly
uses: dtolnay/rust-toolchain@nightly
- name: Dry run cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRIES_SYS_TOKEN }}
shell: bash
run: |
cargo publish --dry-run -p wasmedge-sys
- name: Publish
if: github.ref == 'refs/heads/main'
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRIES_SYS_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
cargo publish -p wasmedge-sys
- name: Build API document
run: |
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc -p wasmedge-sys --workspace --no-deps --features aot,wasi_crypto,wasi_nn,wasmedge_process,ffi --target-dir=./target
- name: Deploy API document
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: target/doc
force_orphan: true