Skip to content

Commit 306a66e

Browse files
committed
Make GitHub build workflow handle debug and release pushes differently
1 parent 21f2e84 commit 306a66e

3 files changed

Lines changed: 129 additions & 50 deletions

File tree

.github/workflows/build-debug.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Package and Upload Z2Randomizer Debug
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- testing
7+
tags-ignore:
8+
- '**'
9+
pull_request:
10+
11+
env:
12+
# I'm not a fan of the telemetry as-is, but this also suppresses some lines in the build log.
13+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
14+
# This removes even more spurious lines.
15+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
16+
17+
jobs:
18+
build:
19+
strategy:
20+
matrix:
21+
platform: [
22+
{ os: ubuntu-latest, arch: x64 },
23+
]
24+
dotnet-version: [ '8.0.x' ]
25+
26+
runs-on: ${{ matrix.platform.os }}
27+
steps:
28+
- name: Checkout codebase
29+
uses: actions/checkout@v2
30+
with:
31+
submodules: recursive
32+
33+
- name: Setup dotnet ${{ matrix.dotnet-version }}
34+
uses: actions/setup-dotnet@v3
35+
with:
36+
dotnet-version: ${{ matrix.dotnet-version }}
37+
38+
- name: Publish Desktop Debug
39+
run: dotnet publish -c Debug -o CrossPlatformUI/bin/publish CrossPlatformUI.Desktop/CrossPlatformUI.Desktop.csproj
40+
41+
- name: Upload Linux Build To Artifacts
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: Z2Randomizer-${{ matrix.platform.os }}-${{ matrix.platform.arch }}-Debug
45+
# don't compress hard since it's not a real release
46+
compression-level: 6
47+
path: |
48+
CrossPlatformUI/bin/publish
49+
!**/*.pdb
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Package and Upload Z2Randomizer Release
2+
3+
on:
4+
push:
5+
branches:
6+
- testing
7+
tags:
8+
- '[0-9]+.[0-9]+.[0-9]+'
9+
10+
env:
11+
# I'm not a fan of the telemetry as-is, but this also suppresses some lines in the build log.
12+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
13+
# This removes even more spurious lines.
14+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
15+
16+
jobs:
17+
build:
18+
strategy:
19+
matrix:
20+
platform: [
21+
{ os: windows-latest, arch: x64 },
22+
{ os: macos-14, arch: arm64 },
23+
{ os: ubuntu-latest, arch: x64 },
24+
{ os: ubuntu-latest, arch: browser-wasm },
25+
]
26+
dotnet-version: [ '8.0.x' ]
27+
28+
runs-on: ${{ matrix.platform.os }}
29+
steps:
30+
- name: Checkout codebase
31+
uses: actions/checkout@v2
32+
with:
33+
submodules: recursive
34+
35+
- name: Setup dotnet ${{ matrix.dotnet-version }}
36+
uses: actions/setup-dotnet@v3
37+
with:
38+
dotnet-version: ${{ matrix.dotnet-version }}
39+
40+
- name: Publish Desktop
41+
if: ${{ !startsWith(matrix.platform.arch, 'browser-wasm') }}
42+
run: dotnet publish -c Release -o CrossPlatformUI/bin/publish CrossPlatformUI.Desktop/CrossPlatformUI.Desktop.csproj
43+
44+
- name: Publish Browser
45+
if: ${{ startsWith(matrix.platform.arch, 'browser-wasm') }}
46+
run: |
47+
cd CrossPlatformUI.Browser
48+
dotnet workload restore
49+
cd ..
50+
dotnet publish -c Release -o CrossPlatformUI/bin/publish CrossPlatformUI.Browser/CrossPlatformUI.Browser.csproj
51+
52+
- name: Upload Windows Build To Artifacts
53+
if: ${{ matrix.platform.os == 'windows-latest' }}
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: Z2Randomizer-Windows-${{ matrix.platform.arch }}-Portable
57+
compression-level: 9
58+
path: |
59+
CrossPlatformUI/bin/publish
60+
!**/*.pdb
61+
62+
- name: Upload Browser Build To Artifacts
63+
if: ${{ startsWith(matrix.platform.arch, 'browser-wasm') }}
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: Z2Randomizer-Browser-AppBundle
67+
compression-level: 9
68+
path: |
69+
CrossPlatformUI.Browser/bin/Release/net8.0-browser/browser-wasm/AppBundle/
70+
!**/*.pdb
71+
72+
- name: Upload Linux/Mac Build To Artifacts
73+
if: ${{ matrix.platform.os != 'windows-latest' && !startsWith(matrix.platform.arch, 'browser-wasm') }}
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: Z2Randomizer-${{ matrix.platform.os }}-${{ matrix.platform.arch }}
77+
compression-level: 9
78+
path: |
79+
CrossPlatformUI/bin/publish
80+
!**/*.pdb

.github/workflows/build.yaml

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)