mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-07 13:45:42 +12:00
new github action
This commit is contained in:
parent
e04f549b11
commit
eddf5500c7
12 changed files with 99 additions and 173 deletions
56
.github/workflows/build.yml
vendored
Executable file
56
.github/workflows/build.yml
vendored
Executable file
|
@ -0,0 +1,56 @@
|
|||
name: build-server
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: "./Horse Isle Server"
|
||||
|
||||
jobs:
|
||||
build-server:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
arch: ["x64", "arm64"]
|
||||
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
|
||||
exclude:
|
||||
- os: macos-latest
|
||||
arch: arm64 # no arm64 mac runner on github
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
arch: arm
|
||||
- os: windows-latest
|
||||
arch: x86
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
env:
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: "true"
|
||||
DOTNET_NOLOGO: "true"
|
||||
with:
|
||||
dotnet-version: 5.0.x
|
||||
|
||||
- name: Build ${{ runner.os }}-${{ matrix.arch }}
|
||||
continue-on-error: false
|
||||
env:
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: "true"
|
||||
DOTNET_NOLOGO: "true"
|
||||
run: |
|
||||
dotnet publish -p:PublishProfile=${{ runner.os }}-${{ matrix.arch }}.pubxml
|
||||
cp ../DataCollection/*.json "HorseIsleServer/bin/${{ matrix.arch }}/${{ runner.os }}/publish/"
|
||||
cp ../DataCollection/*.MAP "HorseIsleServer/bin/${{ matrix.arch }}/${{ runner.os }}/publish/"
|
||||
mkdir "HorseIsleServer/bin/${{ matrix.arch }}/${{ runner.os }}/publish/www"
|
||||
cp -R ../WebInterface/* "HorseIsleServer/bin/${{ matrix.arch }}/${{ runner.os }}/publish/www"
|
||||
|
||||
- name: upload ${{ runner.os }}-${{ matrix.arch }}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ runner.os }}-${{ matrix.arch }}
|
||||
path: Horse Isle Server/HorseIsleServer/bin/${{ matrix.arch }}/${{ runner.os }}/publish/
|
72
.github/workflows/linux.yml
vendored
72
.github/workflows/linux.yml
vendored
|
@ -1,72 +0,0 @@
|
|||
name: linux
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./Horse Isle Server
|
||||
|
||||
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
|
||||
|
||||
|
||||
- name: Build linux-64
|
||||
continue-on-error: false
|
||||
run: |
|
||||
dotnet publish -p:PublishProfile=Linux64.pubxml
|
||||
cp ../DataCollection/*.json "HorseIsleServer/bin/x64/Linux/net5.0/linux-x64/publish/"
|
||||
cp ../DataCollection/*.MAP "HorseIsleServer/bin/x64/Linux/net5.0/linux-x64/publish/"
|
||||
mkdir "HorseIsleServer/bin/x64/Linux/net5.0/linux-x64/publish/www"
|
||||
cp -R ../WebInterface/* "HorseIsleServer/bin/x64/Linux/net5.0/linux-x64/publish/www"
|
||||
|
||||
- name: Build linux-arm
|
||||
continue-on-error: false
|
||||
run: |
|
||||
dotnet publish -p:PublishProfile=LinuxARM.pubxml
|
||||
cp ../DataCollection/*.json "HorseIsleServer/bin/ARM/Linux/net5.0/linux-arm/publish/"
|
||||
cp ../DataCollection/*.MAP "HorseIsleServer/bin/ARM/Linux/net5.0/linux-arm/publish/"
|
||||
mkdir "HorseIsleServer/bin/ARM/Linux/net5.0/linux-arm/publish/www"
|
||||
cp -R ../WebInterface/* "HorseIsleServer/bin/ARM/Linux/net5.0/linux-arm/publish/www"
|
||||
|
||||
- name: Build linux-arm64
|
||||
continue-on-error: false
|
||||
run: |
|
||||
dotnet publish -p:PublishProfile=LinuxARM64.pubxml
|
||||
cp ../DataCollection/*.json "HorseIsleServer/bin/ARM64/Linux/net5.0/linux-arm64/publish/"
|
||||
cp ../DataCollection/*.MAP "HorseIsleServer/bin/ARM64/Linux/net5.0/linux-arm64/publish/"
|
||||
mkdir "HorseIsleServer/bin/ARM64/Linux/net5.0/linux-arm64/publish/www/"
|
||||
cp -R ../WebInterface/* "HorseIsleServer/bin/ARM64/Linux/net5.0/linux-arm64/publish/www/"
|
||||
|
||||
- name: upload linux-64
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: linux-x64
|
||||
path: Horse Isle Server/HorseIsleServer/bin/x64/Linux/net5.0/linux-x64/publish/
|
||||
|
||||
- name: upload linux-arm
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: linux-arm
|
||||
path: Horse Isle Server/HorseIsleServer/bin/ARM/Linux/net5.0/linux-arm/publish/
|
||||
|
||||
- name: upload linux-arm64
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: linux-arm64
|
||||
path: Horse Isle Server/HorseIsleServer/bin/ARM64/Linux/net5.0/linux-arm64/publish/
|
42
.github/workflows/macos.yml
vendored
42
.github/workflows/macos.yml
vendored
|
@ -1,42 +0,0 @@
|
|||
name: macos
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./Horse Isle Server
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: macos-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
|
||||
|
||||
|
||||
- name: Build mac-64
|
||||
continue-on-error: false
|
||||
run: |
|
||||
dotnet publish -p:PublishProfile=MacOS.pubxml
|
||||
cp ../DataCollection/*.json "HorseIsleServer/bin/x64/MacOS/net5.0/osx-x64/publish/"
|
||||
cp ../DataCollection/*.MAP "HorseIsleServer/bin/x64/MacOS/net5.0/osx-x64/publish/"
|
||||
mkdir "HorseIsleServer/bin/x64/MacOS/net5.0/osx-x64/publish/www"
|
||||
cp -R ../WebInterface/* "HorseIsleServer/bin/x64/MacOS/net5.0/osx-x64/publish/www"
|
||||
|
||||
- name: upload mac-64
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: mac-x64
|
||||
path: Horse Isle Server/HorseIsleServer/bin/x64/MacOS/net5.0/osx-x64/publish/
|
53
.github/workflows/windows.yml
vendored
53
.github/workflows/windows.yml
vendored
|
@ -1,53 +0,0 @@
|
|||
name: windows
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./Horse Isle Server
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: windows-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
|
||||
|
||||
|
||||
- name: Build win-x64
|
||||
continue-on-error: false
|
||||
run: |
|
||||
dotnet publish -p:PublishProfile=Win64.pubxml
|
||||
copy ..\DataCollection\gamedata.json "HorseIsleServer\bin\x64\Windows\net5.0\win-x64\publish\gamedata.json"
|
||||
copy ..\DataCollection\HI1.MAP "HorseIsleServer\bin\x64\Windows\net5.0\win-x64\publish\HI1.MAP"
|
||||
copy ..\WebInterface "HorseIsleServer\bin\x64\Windows\net5.0\win-x64\publish\www" -Recurse
|
||||
- name: Build win-x86
|
||||
continue-on-error: false
|
||||
run: |
|
||||
dotnet publish -p:PublishProfile=Win32.pubxml
|
||||
copy ..\DataCollection\gamedata.json "HorseIsleServer\bin\x86\Windows\net5.0\win-x86\publish\gamedata.json"
|
||||
copy ..\DataCollection\HI1.MAP "HorseIsleServer\bin\x86\Windows\net5.0\win-x86\publish\HI1.MAP"
|
||||
copy ..\WebInterface "HorseIsleServer\bin\x86\Windows\net5.0\win-x86\publish\www" -Recurse
|
||||
- name: Upload win-x64
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: win-x64
|
||||
path: Horse Isle Server\HorseIsleServer\bin/x64\Windows\net5.0\win-x64\publish\
|
||||
|
||||
- name: Upload win-x86
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: win-x86
|
||||
path: Horse Isle Server\HorseIsleServer\bin\x86\Windows\net5.0\win-x86\publish\
|
|
@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
|||
<PropertyGroup>
|
||||
<Configuration>Linux</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
<PublishDir>bin\ARM\Linux\net5.0\linux-arm\publish\</PublishDir>
|
||||
<PublishDir>bin\arm\Linux\publish\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<RuntimeIdentifier>linux-arm</RuntimeIdentifier>
|
|
@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
|||
<PropertyGroup>
|
||||
<Configuration>Linux</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
<PublishDir>bin\ARM64\Linux\net5.0\linux-arm64\publish\</PublishDir>
|
||||
<PublishDir>bin\arm64\Linux\publish\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<RuntimeIdentifier>linux-arm64</RuntimeIdentifier>
|
|
@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
|||
<PropertyGroup>
|
||||
<Configuration>Linux</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
<PublishDir>bin\x64\Linux\net5.0\linux-x64\publish\</PublishDir>
|
||||
<PublishDir>bin\x64\Linux\publish\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
cant really test this i dont have an m1 mac
|
||||
-->
|
||||
<Project ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration>MacOS</Configuration>
|
||||
<Platform>arm64</Platform>
|
||||
<PublishDir>bin\arm64\MacOS\publish\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<RuntimeIdentifier>osx-arm64</RuntimeIdentifier>
|
||||
<SelfContained>True</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>True</PublishReadyToRun>
|
||||
<PublishTrimmed>True</PublishTrimmed>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
|||
<PropertyGroup>
|
||||
<Configuration>MacOS</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
<PublishDir>bin\x64\MacOS\net5.0\osx-x64\publish\</PublishDir>
|
||||
<PublishDir>bin\x64\MacOS\publish\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration>Windows</Configuration>
|
||||
<Platform>arm64</Platform>
|
||||
<PublishDir>bin\arm64\Windows\publish\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
|
||||
<SelfContained>True</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>True</PublishReadyToRun>
|
||||
<PublishTrimmed>True</PublishTrimmed>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
|||
<PropertyGroup>
|
||||
<Configuration>Windows</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
<PublishDir>bin\x64\Windows\net5.0\win-x64\publish\</PublishDir>
|
||||
<PublishDir>bin\x64\Windows\publish\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
|
@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
|||
<PropertyGroup>
|
||||
<Configuration>Windows</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
<PublishDir>bin\x86\Windows\net5.0\win-x86\publish\</PublishDir>
|
||||
<PublishDir>bin\x86\Windows\publish\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
|
Loading…
Add table
Reference in a new issue