Skip to content

.NET-CI

.NET-CI #18

Workflow file for this run

name: .NET-CI
on:
workflow_dispatch:
pull_request:
branches: [ main ]
env:
PROJECT_PATH: ./BugFablesSaveEditor/BugFablesSaveEditor.Desktop
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
include:
- os: windows-latest
rid: win-x64
buildName: Windows
- os: ubuntu-latest
rid: linux-x64
buildName: Linux
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Install wasm-tools
run: dotnet workload install wasm-tools wasm-experimental
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build
- name: Publish
working-directory: ${{ env.PROJECT_PATH }}
run: dotnet publish -f net8.0 -o publish -r ${{ matrix.rid }}
- name: Prepare Publish Directory
working-directory: ${{ env.PROJECT_PATH }}
run: |
cp ../../LICENSE publish
cp ../../README.md publish
- name: Upload Artifact
uses: actions/[email protected]
with:
name: ${{ github.event.repository.name }}-${{ matrix.buildName }}
path: |
${{ env.PROJECT_PATH }}/publish
!${{ env.PROJECT_PATH }}/publish/*.pdb
!${{ env.PROJECT_PATH }}/publish/*.dbg