|
| 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 |
0 commit comments