mirror of
https://github.com/quamotion/dotnet-packaging.git
synced 2026-02-04 05:35:40 +00:00
40 lines
896 B
YAML
40 lines
896 B
YAML
name: main
|
|
|
|
on: [push, pull_request]
|
|
|
|
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: |
|
|
6.0.x
|
|
7.0.x
|
|
8.0.x
|
|
9.0.x
|
|
10.0.x
|
|
|
|
- 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/
|