File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ jobs :
9+ job-matrix :
10+ name : ${{ matrix.os }}
11+ runs-on : ${{ matrix.os }}
12+ strategy :
13+ fail-fast : true
14+ matrix :
15+ os :
16+ - ubuntu-latest
17+ - macos-latest
18+
19+ steps :
20+ - uses : actions/checkout@v2
21+
22+ - name : Install Rust stable
23+ uses : actions-rs/toolchain@v1
24+ with :
25+ toolchain : stable
26+ profile : minimal
27+ components : llvm-tools-preview
28+ override : true
29+
30+ - name : Set os outputs
31+ id : set-os
32+ run : |
33+ if [[ ${{ matrix.os }} == "macos-latest" ]]; then
34+ echo "::set-output name=os::macos"
35+ elif [[ ${{ matrix.os }} == "ubuntu-latest" ]]; then
36+ echo "::set-output name=os::linux"
37+ else
38+ echo "Unknown OS: ${{ matrix.os }}"
39+ exit 1
40+ fi
41+
42+ - name : debug build
43+ run : |
44+ cargo build
45+ - name : create debug artifact
46+ run : |
47+ d=springql_client-${{ steps.set-os.outputs.os }}-debug
48+ mkdir ${d}
49+
50+ cp springql.h ${d}/
51+ mv target/debug/libspringql_client.{so,dylib} ${d}/ || :
52+
53+ zip -r ${d}.zip ${d}
54+
55+ - name : release build
56+ run : |
57+ cargo build --release
58+ - name : create release artifact
59+ run : |
60+ d=springql_client-${{ steps.set-os.outputs.os }}-release
61+ mkdir ${d}
62+
63+ cp springql.h ${d}/
64+ mv target/release/libspringql_client.{so,dylib} ${d}/ || :
65+
66+ zip -r ${d}.zip ${d}
67+
68+ - name : Upload Files to a GitHub Release (${{ steps.set-os.outputs.os }})
69+ uses : svenstaro/upload-release-action@2.2.1
70+ with :
71+ repo_token : ${{ secrets.GITHUB_TOKEN }}
72+ file_glob : true
73+ file : springql_client-${{ steps.set-os.outputs.os }}-*.zip
74+ tag : ${{ github.ref }}
75+ overwrite : true
76+ prerelease : false
You can’t perform that action at this time.
0 commit comments