Skip to content

Use framework names as documented #18

Use framework names as documented

Use framework names as documented #18

Workflow file for this run

name: .NET
on:
push:
branches: [ main, 'version/**', 'pr/**', 'pr-**' ]
paths-ignore:
- '**/*.md'
pull_request:
branches: [ main, 'version/**', 'pr/**', 'pr-**' ]
types: [opened, synchronize, reopened]
paths-ignore:
- '**/*.md'
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
env:
version: '2.1.0'
versionFile: '2.1.0'
packDotNetVersion: '8'
strategy:
matrix:
os: [ ubuntu-latest ]
dotnet-version: [ '3.x', '6.x', '8.0' ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
run: dotnet restore ./Src/TextTemplating.sln
- name: Build
run: dotnet build --no-restore ./Src/TextTemplating.sln
- name: Test
run: dotnet test --no-build --verbosity normal ./Src/TextTemplating.sln
- name: Pack
if: startsWith(matrix.dotnet-version, env.packDotNetVersion)
run: |
echo "Packing Version: ${{ env.version }}, File Version: ${{ env.versionFile }}"
dotnet build ./Src/TextTemplating.sln /verbosity:minimal --configuration release /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:ContinuousIntegrationBuild=true /p:PackageOutputPath=${{ github.workspace }}/artifacts/ /p:Version=${{ env.version }} /p:FileVersion=${{ env.versionFile }}
dotnet pack ./Src/TextTemplating.sln /verbosity:minimal --configuration release
- name: Upload Artifacts
uses: actions/upload-artifact@v4
if: startsWith(matrix.dotnet-version, env.packDotNetVersion)
with:
name: Packages_${{ env.version }}
path: ${{ github.workspace }}/artifacts/