-
Notifications
You must be signed in to change notification settings - Fork 2
101 lines (96 loc) · 3.2 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
name: Compile Release
on:
release:
types: [created]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Publish
run: |
dotnet publish ArcExplorer -c Release -r win-x64
copy ArcExplorer\bin\Release\net8.0\win-x64\smash_arc.dll ArcExplorer\bin\Release\net8.0\win-x64\publish\smash_arc.dll
- name: Create Release Zip
run: Compress-Archive -path "ArcExplorer\bin\Release\net8.0\win-x64\publish\*" -destinationPath ArcExplorer_win_x64.zip
- name: Upload Zip
uses: actions/upload-artifact@v3
with:
name: ArcExplorer_win_x64
path: ArcExplorer_win_x64.zip
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ArcExplorer_win_x64.zip
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Publish
run: |
cd ArcExplorer
dotnet build -t:BundleApp -p:RuntimeIdentifier=osx-x64 -property:Configuration=Release -p:UseAppHost=true -p:SelfContained=true
cp bin/Release/net8.0/osx-x64/libsmash_arc.dylib bin/Release/net8.0/osx-x64/publish/ArcExplorer.app/Contents/MacOS/libsmash_arc.dylib
cd ..
- name: Sign Binaries
run: codesign -s - --force --deep ArcExplorer/bin/Release/net8.0/osx-x64/publish/ArcExplorer.app
- name: Create Release Zip
run: |
# Ignore folders
cp -r ArcExplorer/bin/Release/net8.0/osx-x64/publish/ArcExplorer.app ArcExplorer.app
zip -r ArcExplorer_macos_x64.zip ArcExplorer.app
- name: Upload Zip
uses: actions/upload-artifact@v3
with:
name: ArcExplorer_macos_x64
path: ArcExplorer_macos_x64.zip
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ArcExplorer_macos_x64.zip
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Publish
run: |
dotnet publish ArcExplorer -c Release -r linux-x64
cp ArcExplorer/bin/Release/net8.0/linux-x64/libsmash_arc.so ArcExplorer/bin/Release/net8.0/linux-x64/publish/libsmash_arc.so
- name: Create Release Zip
run: zip -rj ArcExplorer_linux_x64.zip ArcExplorer/bin/Release/net8.0/linux-x64/publish
- name: Upload Zip
uses: actions/upload-artifact@v3
with:
name: ArcExplorer_linux_x64
path: ArcExplorer_linux_x64.zip
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ArcExplorer_linux_x64.zip
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}