Skip to content

.NET 9 build

.NET 9 build #92

Workflow file for this run

name: build
on: [push, pull_request]
env:
NAME: UnicodeCharsetDetector
CONFIG: Release
BIN_POSTFIX: .Bin
RETENTION_DAYS: 1
defaults:
run:
working-directory: src
jobs:
build:
runs-on: ubuntu-latest
steps:
# Set up
- name: Setup .NET
uses: actions/setup-dotnet@v4.1.0
with:
dotnet-version: |
3.1.x
5.0.x
9.0.x
# Check out
- name: Check out ${{env.NAME}}
uses: actions/checkout@v4.2.2
# Build
- name: Build ${{env.NAME}} ${{env.CONFIG}}
run: dotnet build --configuration ${{env.CONFIG}}
# Test
- name: Test ${{env.NAME}} ${{env.CONFIG}}
run: dotnet test --no-build --configuration ${{env.CONFIG}} --verbosity normal
# Create test report
- name: Create ${{env.NAME}} ${{env.CONFIG}} test report
uses: dorny/test-reporter@v1.9.1
if: ${{success() || failure()}}
with:
name: tests
path: '**/*.trx'
reporter: dotnet-trx
# Upload artifacts
- name: Publish ${{env.NAME}} ${{env.CONFIG}}
uses: actions/upload-artifact@v4.4.3
with:
name: ${{env.NAME}}${{env.BIN_POSTFIX}}
path: bin/${{env.CONFIG}}/${{env.NAME}}.*.*nupkg
retention-days: ${{env.RETENTION_DAYS}}