Skip to content

Commit

Permalink
Create NuGet packages on GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
devlead committed Jul 8, 2020
1 parent 1e26a31 commit 4416876
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,16 @@ on:
jobs:
build:
name: Build
env:
TERM: xterm-256color
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
corefx: ['netcoreapp3.1']
netfx: ['net45']
project: ['KuduSync.NET/KuduSync.NET.csproj']
output: ['artifacts']
steps:
- name: Get the sources
uses: actions/checkout@v2
Expand All @@ -25,9 +31,21 @@ jobs:

- name: Build KuduSync.NET
run: |
dotnet build
dotnet build -p:Configuration=Release
- name: Test
- name: Test Windows
if: matrix.os == 'windows-latest'
shell: cmd
run: .\test.cmd

- name: Create NuGet Packages
if: matrix.os == 'windows-latest'
shell: bash
run: |
dotnet pack ${{ matrix.project }} -p:TargetFramework=${{ matrix.netfx }} -p:TargetFrameworks=${{ matrix.netfx }} --output ${{ matrix.output }} \
&& dotnet pack ${{ matrix.project }} -p:TargetFramework=${{ matrix.corefx }} -p:TargetFrameworks=${{ matrix.corefx }} --output ${{ matrix.output }}
- uses: actions/upload-artifact@v2
with:
name: nupkg
path: artifacts/*.nupkg

0 comments on commit 4416876

Please sign in to comment.