This repository was archived by the owner on Jul 26, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
97 lines (76 loc) · 2.66 KB
/
Copy pathBuild_Launcher.yml
File metadata and controls
97 lines (76 loc) · 2.66 KB
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
name: Build Launcher
on: ['push']
env:
DOTNET_VERSION: '7.0.x'
jobs:
build_windows:
strategy:
matrix:
os: ['windows']
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout repository content
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install dependencies
run: dotnet restore
- name: Publish
run: dotnet publish --configuration Release --use-current-runtime -p:UsePublishBuildSettings=true
- name: Copy files
run: cp -r ./WinterspringLauncher/bin/Release/*/publish/ publish
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: WinterspringLauncher-${{ matrix.os }}-${{ runner.arch }}-${{ github.sha }}
path: publish
if-no-files-found: error
build_macos:
strategy:
matrix:
os: ['macos']
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout repository content
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install dependencies
run: dotnet restore
- name: Publish
run: dotnet publish --configuration Release --runtime osx-arm64 -p:UsePublishBuildSettings=true
- name: Determinante tag
run: echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Create .app
working-directory: MacAppBuilding
run: ./build_app.sh "$GIT_TAG" ../WinterspringLauncher/bin/Release/*/publish/WinterspringLauncher
- name: Create .app zip
working-directory: MacAppBuilding
run: |
cd output
zip -vr ../../WinterspringLauncher-${{ matrix.os }}-arm64-${{ github.sha }}-APP.zip *
- name: Upload .app
uses: actions/upload-artifact@v3
with:
name: WinterspringLauncher-${{ matrix.os }}-arm64-${{ github.sha }}.app
path: WinterspringLauncher-${{ matrix.os }}-arm64-${{ github.sha }}-APP.zip
if-no-files-found: error
- name: Install create-dmg
run: brew install create-dmg
- name: Create .dmg
working-directory: MacAppBuilding
run: ./build_dmg.sh
- name: Upload .dmg
uses: actions/upload-artifact@v3
with:
name: WinterspringLauncher-${{ matrix.os }}-arm64-${{ github.sha }}.dmg
path: MacAppBuilding/output_dmg/
if-no-files-found: error