-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (45 loc) · 1.39 KB
/
build.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
name: build
on:
push:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Setup cmake
uses: jwlawson/[email protected]
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Hakoniwa-core
run: |
bash build.bash
- name: Artifact Name for ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
echo "ARTIFACT_NAME=libshakoc.so" >> $GITHUB_ENV
echo "ARTIFACT_PATH=cmake-build/src/hakoc/libshakoc.so" >> $GITHUB_ENV
- name: Artifact Name for mac
if: matrix.os == 'macos-latest'
run: |
echo "ARTIFACT_NAME=libshakoc.dylib" >> $GITHUB_ENV
echo "ARTIFACT_PATH=cmake-build/src/hakoc/libshakoc.dylib" >> $GITHUB_ENV
- name: upload Artifact
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v3
with:
name: ${{env.ARTIFACT_NAME}}
path: ${{env.ARTIFACT_PATH}}
- name: Publish archives and packages
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
files: |
${{ env.ARTIFACT_PATH }}