Capy64/.github/workflows/dotnet.yml

64 lines
1.8 KiB
YAML
Raw Permalink Normal View History

2023-01-07 23:46:22 +00:00
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
2023-02-23 18:07:42 +00:00
branches: ["main"]
2023-01-07 23:46:22 +00:00
pull_request:
2023-02-23 18:07:42 +00:00
branches: ["main"]
2023-01-07 23:46:22 +00:00
jobs:
2023-02-23 18:07:42 +00:00
build-windows:
runs-on: windows-latest
2023-01-07 23:46:22 +00:00
2023-02-23 18:07:42 +00:00
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Publish for Windows x64
run: dotnet publish Capy64/Capy64.csproj -c Release --no-self-contained -a x64 --os win -p:PublishSingleFile=true -o publish/win-x64
- name: Upload Windows x64 artifact
uses: actions/upload-artifact@v3.1.2
with:
name: Windows-x64
path: publish/win-x64/**
if-no-files-found: error
build-linux:
2023-01-07 23:46:22 +00:00
runs-on: ubuntu-latest
steps:
2023-02-23 18:07:42 +00:00
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Publish for Linux x64
run: dotnet publish Capy64/Capy64.csproj -c Release --no-self-contained -a x64 --os linux -p:PublishSingleFile=true -o publish/linux-x64
- name: Upload Linux x64 artifact
uses: actions/upload-artifact@v3.1.2
with:
name: Linux-x64
path: publish/linux-x64/**
if-no-files-found: error