Skip to content

v0.1-test2

v0.1-test2 #1

Workflow file for this run

name: Project Release
on:
release:
types:
- published
jobs:
build-server:
strategy:
matrix:
version:
- 8.0.x
target:
- linux-arm
- linux-arm64
- linux-x64
- win-x64
- win-x86
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup dotnet ${{ matrix.version }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.version}}
- name: Compile target
run: dotnet publish Source/Server/GameServer.csproj -c Release -r ${{ matrix.target }} --self-contained true -p:PublishSingleFile=true -p:PublishReadyToRun=true
- name: Find release
run: ls Source/Server/bin/Release/net8.0/${{ matrix.target }}/publish
- name: Rename and Zip Linux release
run: zip -j ${{ matrix.target }}.zip Source/Server/bin/Release/net8.0/${{ matrix.target }}/publish/GameServer
if: startsWith( matrix.target, 'linux')
- name: Rename and Zip Windows release
run: zip -j ${{ matrix.target }}.zip Source/Server/bin/Release/net8.0/${{ matrix.target }}/publish/GameServer.exe
if: startsWith( matrix.target, 'win')
- name: Upload compressed release
uses: softprops/action-gh-release@v2
with:
files: ${{ matrix.target }}.zip