78 lines
3.1 KiB
YAML
78 lines
3.1 KiB
YAML
name: .NET Pre-Release
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: 5.0.x
|
|
- name: Restore dependencies
|
|
run: dotnet restore LinuxSolution.sln
|
|
- name: Build
|
|
run: dotnet build LinuxSolution.sln --no-restore
|
|
- name: Test
|
|
run: dotnet test LinuxSolution.sln --no-build --verbosity normal
|
|
|
|
- name: Publish WindowsServer
|
|
run: dotnet publish Barotrauma/BarotraumaServer/WindowsServer.csproj -c Release -clp:"ErrorsOnly;Summary" --self-contained -r win-x64 \/p:Platform="x64"
|
|
- name: Publish WindowsClient
|
|
run: dotnet publish Barotrauma/BarotraumaClient/WindowsClient.csproj -c Release -clp:"ErrorsOnly;Summary" --self-contained -r win-x64 \/p:Platform="x64"
|
|
|
|
- name: Publish LinuxServer
|
|
run: dotnet publish Barotrauma/BarotraumaServer/LinuxServer.csproj -c Release -clp:"ErrorsOnly;Summary" --self-contained -r linux-x64 \/p:Platform="x64"
|
|
- name: Publish LinuxClient
|
|
run: dotnet publish Barotrauma/BarotraumaClient/LinuxClient.csproj -c Release -clp:"ErrorsOnly;Summary" --self-contained -r linux-x64 \/p:Platform="x64"
|
|
|
|
- name: Publish MacServer
|
|
run: dotnet publish Barotrauma/BarotraumaServer/MacServer.csproj -c Release -clp:"ErrorsOnly;Summary" --self-contained -r osx-x64 \/p:Platform="x64"
|
|
- name: Publish MacClient
|
|
run: dotnet publish Barotrauma/BarotraumaClient/MacClient.csproj -c Release -clp:"ErrorsOnly;Summary" --self-contained -r osx-x64 \/p:Platform="x64"
|
|
|
|
|
|
- name: Archive Windows Release
|
|
uses: thedoctor0/zip-release@master
|
|
with:
|
|
type: 'zip'
|
|
filename: 'barotrauma_lua_windows.zip'
|
|
#exclusions: '*.git* /*node_modules/* .editorconfig'
|
|
directory: 'Barotrauma/bin/ReleaseWindows/netcoreapp3.1/win-x64/publish'
|
|
|
|
- name: Archive Linux Release
|
|
uses: thedoctor0/zip-release@master
|
|
with:
|
|
type: 'zip'
|
|
filename: 'barotrauma_lua_linux.zip'
|
|
#exclusions: '*.git* /*node_modules/* .editorconfig'
|
|
directory: 'Barotrauma/bin/ReleaseLinux/netcoreapp3.1/linux-x64/publish'
|
|
|
|
- name: Archive Mac Release
|
|
uses: thedoctor0/zip-release@master
|
|
with:
|
|
type: 'zip'
|
|
filename: 'barotrauma_lua_mac.zip'
|
|
#exclusions: '*.git* /*node_modules/* .editorconfig'
|
|
directory: 'Barotrauma/bin/ReleaseMac/netcoreapp3.1/osx-x64/publish'
|
|
|
|
- name: Automatic Release
|
|
uses: marvinpinto/action-automatic-releases@v1.2.1
|
|
with:
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
automatic_release_tag: "latest"
|
|
prerelease: true
|
|
title: "Pre-Release: Automatic Build"
|
|
files: |
|
|
Barotrauma/bin/ReleaseWindows/netcoreapp3.1/win-x64/publish/barotrauma_lua_windows.zip
|
|
Barotrauma/bin/ReleaseLinux/netcoreapp3.1/linux-x64/publish/barotrauma_lua_linux.zip
|
|
Barotrauma/bin/ReleaseMac/netcoreapp3.1/osx-x64/publish/barotrauma_lua_mac.zip
|