ExtinctionOnline/.github/workflows/exoserver.yml

40 lines
1.5 KiB
YAML
Raw Normal View History

2022-11-13 23:18:14 +09:00
name: Extinction Online CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./ExtinctionOnline.Server
strategy:
matrix:
dotnet-version: ['6.0.x']
publishes: [ win-x64, osx-x64, linux-x64 ]
2022-11-13 23:36:26 +09:00
contained: [true, false]
2022-11-13 23:18:14 +09:00
steps:
2023-06-10 09:20:42 +09:00
- uses: https://github.com/actions/checkout@v3
2022-11-13 23:18:14 +09:00
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
2023-06-10 09:08:42 +09:00
uses: https://github.com/actions/setup-dotnet@v3
2022-11-13 23:18:14 +09:00
with:
dotnet-version: ${{ matrix.dotnet-version }}
2023-06-10 09:08:42 +09:00
- uses: https://github.com/actions/cache@v3
2022-11-13 23:18:14 +09:00
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget
- name: Install dependencies
run: dotnet add package Fleck --version 1.2.0
- name: Publish
2022-11-13 23:36:26 +09:00
run: dotnet publish -c Release -p:PublishSingleFile=true --self-contained ${{ matrix.contained }} -r ${{ matrix.publishes }}
2022-11-13 23:18:14 +09:00
-o ./bin/Release/${{ matrix.publishes }}/
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
2022-11-13 23:36:26 +09:00
name: Extinction Online Server ${{ matrix.publishes }} ${{ matrix.contained == true && 'With Runtime' || matrix.contained == false && 'Without Runtime' }}
2022-11-13 23:18:14 +09:00
path: |
ExtinctionOnline.Server/bin/Release/${{ matrix.publishes }}/*