Skip to content

Commit b6bb2a7

Browse files
committed
feat: add zxbinstaller builder pipeline
Also rename build.yaml file to builder-zxbstudio.yml to make a clearer distinction.
1 parent be7320b commit b6bb2a7

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Build .NET project
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout repo
11+
uses: actions/checkout@v4
12+
13+
- name: Install .NET 8
14+
run: |
15+
curl -Lo dotnet.tar.gz https://download.visualstudio.microsoft.com/download/pr/a91ddad4-a3c2-4303-9efc-1ca6b7af850c/be1763df9211599df1cf1c6f504b3c41/dotnet-sdk-8.0.405-linux-x64.tar.gz
16+
mkdir dotnet
17+
tar -C dotnet -xf dotnet.tar.gz
18+
rm dotnet.tar.gz
19+
echo DOTNET_ROOT=~/dotnet >> $GITHUB_ENV
20+
echo PATH=$PATH:~/dotnet >> $GITHUB_ENV
21+
22+
- name: Show version
23+
run: dotnet --version
24+
25+
- name: Clean build artifacts
26+
run: dotnet restore
27+
28+
- name: Build project
29+
run: dotnet build ZXBasicStudio.sln --configuration Release --no-restore
30+
31+
- name: Publish for Linux
32+
run: |
33+
dotnet publish ZXBSInstaller/ZXBSInstaller.csproj -c Release -r linux-x64 --self-contained true -p:PublishSingleFile=true -o out
34+
35+
- name: Publish for Windows
36+
run: |
37+
dotnet publish ZXBSInstaller/ZXBSInstaller.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -o out-win
38+
39+
- name: Publish for Mac
40+
run: |
41+
dotnet publish ZXBSInstaller/ZXBSInstaller.csproj -c Release -r osx-x64 --self-contained true -p:PublishSingleFile=true -o out-mac-x64
42+
dotnet publish ZXBSInstaller/ZXBSInstaller.csproj -c Release -r osx-arm64 --self-contained true -p:PublishSingleFile=true -o out-mac-arm64
43+
44+
- uses: actions/upload-artifact@v4
45+
with:
46+
name: ZXBSInstaller-linux-x64
47+
path: ~/work/ZXBSInstaller/ZXBSInstaller/out/
48+
49+
- uses: actions/upload-artifact@v4
50+
with:
51+
name: ZXBSInstaller-win-x64
52+
path: ~/work/ZXBSInstaller/ZXBSInstaller/out-win/
53+
54+
- uses: actions/upload-artifact@v4
55+
with:
56+
name: ZXBSInstaller-osx-x64
57+
path: ~/work/ZXBSInstaller/ZXBSInstaller/out-mac-x64/
58+
59+
- uses: actions/upload-artifact@v4
60+
with:
61+
name: ZXBSInstaller-osx-arm64
62+
path: ~/work/ZXBSInstaller/ZXBSInstaller/out-mac-arm64/
63+

0 commit comments

Comments
 (0)