Add build workflow
This commit is contained in:
parent
9c0699bf2c
commit
a39eaa11f1
24
.github/workflows/build.yml
vendored
Normal file
24
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
name: Build Client & Server
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'Pal.Client/**'
|
||||||
|
- 'Pal.Common/**'
|
||||||
|
- 'Pal.Server/**'
|
||||||
|
- 'vendor/**'
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup .NET SDK
|
||||||
|
uses: actions/setup-dotnet@v3
|
||||||
|
with:
|
||||||
|
dotnet-version: 7.0
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: dotnet restore
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: dotnet build --configuration Release --no-restore
|
2
.github/workflows/server.yml
vendored
2
.github/workflows/server.yml
vendored
@ -25,4 +25,4 @@ jobs:
|
|||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
tags: ghcr.io/${{ github.repository_owner }}/palace-pal:latest
|
tags: ghcr.io/${{ github.repository_owner }}/palace-pal:latest
|
||||||
|
@ -5,7 +5,7 @@ COPY Pal.Server/Pal.Server.csproj Pal.Server/
|
|||||||
RUN dotnet restore Pal.Server/Pal.Server.csproj
|
RUN dotnet restore Pal.Server/Pal.Server.csproj
|
||||||
|
|
||||||
COPY . ./
|
COPY . ./
|
||||||
RUN dotnet publish Pal.Server/Pal.Server.csproj -c Release -o /dist
|
RUN dotnet publish Pal.Server/Pal.Server.csproj --configuration Release --no-restore -o /dist
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS runtime
|
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS runtime
|
||||||
EXPOSE 5415
|
EXPOSE 5415
|
||||||
|
Loading…
Reference in New Issue
Block a user