mirror of
https://github.com/Impostor/Impostor.git
synced 2026-10-20 01:46:11 +00:00
45 lines
1.4 KiB
YAML
45 lines
1.4 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, dev ]
|
|
paths:
|
|
- 'src/**'
|
|
- '.gitmodules'
|
|
pull_request:
|
|
branches: [ master, dev ]
|
|
paths:
|
|
- 'src/**'
|
|
- '.gitmodules'
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- name: Setup .NET Core
|
|
uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: 3.1.301
|
|
- name: Install dependencies
|
|
run: dotnet restore ./src
|
|
- name: Build Impostor.Client
|
|
run: dotnet build --no-restore -c Release -f netcoreapp3.1 ./src/Impostor.Client/Impostor.Client.csproj
|
|
- name: Build Impostor.Server
|
|
run: dotnet build --no-restore -c Release -f netcoreapp3.1 ./src/Impostor.Server/Impostor.Server.csproj
|
|
- name: Test
|
|
run: dotnet test --no-restore -v normal -f netcoreapp3.1 ./src
|
|
deploy:
|
|
name: Deploy
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
if: github.event_name == 'release'
|
|
steps:
|
|
- name: Publish Impostor.Server (win-x64)
|
|
run: dotnet publish -c release -o /build/linux-x64 -f netcoreapp3.1 -r win-x64 --self-contained --no-restore ./src/Impostor.Server/Impostor.Server.csproj
|
|
- name: Publish Impostor.Server (linux-x64)
|
|
run: dotnet publish -c release -o /build/linux-x64 -f netcoreapp3.1 -r linux-x64 --self-contained --no-restore ./src/Impostor.Server/Impostor.Server.csproj |