-
Notifications
You must be signed in to change notification settings - Fork 77
54 lines (42 loc) · 1.65 KB
/
develop.yaml
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
name: Developer release
on:
push:
branches:
- develop
jobs:
dev-build:
name: Develop build
# All architectures supported
strategy:
matrix:
arch: ['win-x64', 'win-arm64', 'linux-x64', 'linux-arm64', 'osx-x64', 'osx-arm64']
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.201
- name: Build
shell: bash
# run: bash build-all.sh
run: |
version=$(cat src/GICutscenes.csproj | grep -oP "<Version>\K([0-9]\.[0-9]\.[0-9])")
release_name="GICutscenes-$version-${GITHUB_SHA::6}-${{ matrix.arch }}"
release_name_standalone="$release_name-standalone"
# Self contained
dotnet publish -c Release -r "${{ matrix.arch }}" -o "$release_name_standalone" --self-contained
# Framework dependant
dotnet publish -c Release -r "${{ matrix.arch }}" -o "$release_name" --self-contained false -p:PublishTrimmed=false
if [ "${{ matrix.arch }}" == "win-x64" ]; then
# Pack for standalone version
7z a -tzip "${release_name_standalone}.zip" "./${release_name_standalone}/*"
# Pack for Framework dependant version
7z a -tzip "${release_name}.zip" "./${release_name}/*"
else
tar czvf "${release_name_standalone}.tar.gz" "$release_name_standalone"
tar czvf "${release_name}.tar.gz" "$release_name"
fi
rm -r "$release_name_standalone"
rm -r "$release_name"