-
Notifications
You must be signed in to change notification settings - Fork 1
117 lines (112 loc) · 3.29 KB
/
release.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Compile Release
on:
release:
types: [created]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Build
run: |
cd xc3_model_py
cargo build --release
- name: Create Release Zip
run: |
cp xc3_model_py/target/release/libxc3_model_py.so xenoblade_blender/xc3_model_py.so
zip -r xenoblade_blender_linux_x64.zip xenoblade_blender
- name: Upload Zip
uses: actions/upload-artifact@v4
with:
name: xenoblade_blender_linux
path: xenoblade_blender_linux_x64.zip
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: xenoblade_blender_linux_x64.zip
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Build
run: |
cd xc3_model_py
cargo build --release
- name: Create Release Zip
run: |
cp xc3_model_py/target/release/xc3_model_py.dll xenoblade_blender/xc3_model_py.pyd
Compress-Archive -path xenoblade_blender -destinationPath xenoblade_blender_win_x64.zip
- name: Upload Zip
uses: actions/upload-artifact@v4
with:
name: xenoblade_blender_win
path: xenoblade_blender_win_x64.zip
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: xenoblade_blender_win_x64.zip
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
build-macos:
runs-on: macos-latest
strategy:
matrix:
target: [x86_64-apple-darwin]
desc: [intel]
include:
- target: aarch64-apple-darwin
desc: apple_silicon
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install maturin
run: |
python -m pip install --upgrade pip
pip install maturin
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{matrix.target}}
- name: Build
run: |
cd xc3_model_py/xc3_model_py
maturin build --release --target=${{matrix.target}}
cd ../..
- name: Create Release Zip
run: |
cp xc3_model_py/target/${{matrix.target}}/release/libxc3_model_py.dylib xenoblade_blender/xc3_model_py.so
zip -r xenoblade_blender_macos_${{matrix.desc}}.zip xenoblade_blender
- name: Upload Zip
uses: actions/upload-artifact@v4
with:
name: xenoblade_blender_macos_${{matrix.desc}}
path: xenoblade_blender_macos_${{matrix.desc}}.zip
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: xenoblade_blender_macos_${{matrix.desc}}.zip
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}