-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (41 loc) · 1.47 KB
/
Copy pathrelease.yml
File metadata and controls
52 lines (41 loc) · 1.47 KB
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
name: Release
on:
push:
tags:
- 'v*'
jobs:
build_release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build C++ Sys Library
run: |
cargo build --release
- name: Package Release Tarball
run: |
mkdir -p fluvio-client-cpp-linux-x64/lib
mkdir -p fluvio-client-cpp-linux-x64/include/fluvio-client-cpp/src
mkdir -p fluvio-client-cpp-linux-x64/include/rust
# Copy static library
cp target/release/libfluvio_client_cpp.a fluvio-client-cpp-linux-x64/lib/
# Copy manual C/C++ Headers
cp -r include/* fluvio-client-cpp-linux-x64/include/
# Find and copy generated headers
find target/release/build -name 'lib.rs.h' -exec cp {} fluvio-client-cpp-linux-x64/include/fluvio-client-cpp/src/ \;
find target/release/build -name 'cxx.h' -exec cp {} fluvio-client-cpp-linux-x64/include/rust/ \;
# Add CMake config
cp fluvio_client_cppConfig.cmake fluvio-client-cpp-linux-x64/
tar -czvf fluvio-client-cpp-linux-x64.tar.gz fluvio-client-cpp-linux-x64/
- name: Upload Release Asset
uses: softprops/action-gh-release@v1
with:
files: fluvio-client-cpp-linux-x64.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}