Skip to content

Commit 605b807

Browse files
committed
Add GitHub workflow
1 parent e637bff commit 605b807

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/main.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: main
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
dotnet-version: [ '3.1.x', '6.0.x' ]
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Build
17+
run: |
18+
dotnet restore dotnet-packaging.sln
19+
dotnet pack dotnet-packaging.sln -c Release -o pkg/
20+
cp demo/Directory.Build.props pkg/
21+
cp demo/version.txt pkg/
22+
23+
- name: Test
24+
run: |
25+
dotnet test Packaging.Targets.Tests/Packaging.Targets.Tests.csproj -l "trx;LogFileName=pkg/Packaging.Targets.Tests.trx"
26+
27+
- uses: actions/upload-artifact@v4
28+
with:
29+
name: pkg
30+
path: pkg/

0 commit comments

Comments
 (0)