diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..8577147 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,30 @@ +name: main + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + dotnet-version: [ '3.1.x', '6.0.x' ] + + steps: + - uses: actions/checkout@v4 + + - 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 + with: + name: pkg + path: pkg/