Updates workflows again #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build project | |
on: | |
push: | |
branches: [master, dev] | |
pull_request: | |
branches: [master, dev] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build ${{ matrix.projectPath }} for ${{ matrix.targetPlatform }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
projectPath: | |
- Blocktest | |
- DedicatedServer | |
targetPlatform: | |
- linux-x64 # Build a macOS standalone (Intel 64-bit). | |
- win-x86 # Build a Windows 32-bit standalone. | |
- win-x64 # Build a Windows 64-bit standalone. | |
- osx-x64 # Build a Linux 64-bit standalone. | |
dotnet: | |
- 8.x | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
${{ matrix.dotnet }} | |
3.1.x | |
- name: Build | |
run: dotnet publish ${{ matrix.projectPath }} --configuration Release --runtime ${{ matrix.targetPlatform }} -p:PublishReadyToRun=false -p:TieredCompilation=false -p:PublishSingleFile=true -p:Version=$(git describe --tags) --self-contained false --output ./Build/${{ matrix.targetPlatform }} | |
- name: Zip build | |
run: | | |
pushd Build/${{ matrix.targetPlatform }} | |
zip -r ../../Blocktest-${{ matrix.targetPlatform }}-${{ matrix.dotnet }}.zip . | |
popd | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.projectPath }}-${{ matrix.targetPlatform }}-${{ matrix.dotnet }} | |
path: ./Blocktest-${{ matrix.targetPlatform }}-${{ matrix.dotnet }}.zip | |
compression-level: 0 |