Update dotnet.yml #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: .NET Test | |
on: | |
workflow_dispatch: | |
push: | |
paths-ignore: | |
- '**/*.md' | |
pull_request: | |
paths-ignore: | |
- '**/*.md' | |
branches: | |
- "123" | |
jobs: | |
test: | |
runs-on: windows-latest | |
env: | |
DOTNET_NOLOGO: false | |
DOTNET_CLI_TELEMETRY_OPTOUT: false | |
SolutionName: Fika.Core | |
CSProj: Source/Fika.Core.csproj | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
# Restore all projects | |
- name: dotnet Restore | |
run: dotnet restore | |
- name: dotnet Publish | |
run: | | |
mkdir ${{ env.SolutionName }}-${{ matrix.configuration }} | |
dotnet build ${{ env.CSProj }} -c ${{ matrix.configuration }} -o ${{ env.SolutionName }}-${{ matrix.configuration }} | |
- name: Zip remaining files | |
run: | | |
Compress-Archive -Path ${{ env.SolutionName }}-${{ matrix.configuration }} -DestinationPath ${{ env.SolutionName }}-${{ matrix.configuration }}.zip | |
# Upload artifact with github commit SHA | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.SolutionName }}-${{ matrix.configuration }}-${{ github.sha }} | |
path: ${{ env.SolutionName }}-${{ matrix.configuration }}\ | |
if-no-files-found: error |