Skip to content

Enable workflow on PR #12

Enable workflow on PR

Enable workflow on PR #12

Workflow file for this run

name: main
on: [push, pull_request]
# Needed for .NET 9 support, as this is currently not included on ubuntu-latest
env:
DOTNET_VERSION: '9.0.x'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build
run: |
dotnet restore dotnet-packaging.sln
dotnet pack dotnet-packaging.sln -c Release -o pkg/
cp demo/Directory.Build.props pkg/
cp demo/version.txt pkg/
- name: Test
run: |
dotnet test Packaging.Targets.Tests/Packaging.Targets.Tests.csproj -l "trx;LogFileName=pkg/Packaging.Targets.Tests.trx"
- uses: actions/upload-artifact@v4
if: github.event_name != 'pull_request'
with:
name: pkg
path: pkg/