Skip to content

Commit 16cb756

Browse files
authored
Merge pull request #175 from janusw/gha_pkg
GitHub Actions: upload nupkg as artifact
2 parents 7cc00fb + 4405777 commit 16cb756

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

.github/workflows/main.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,32 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
12-
build:
1312

13+
linuxBuild:
1414
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
with:
18+
fetch-depth: 0
19+
- name: Setup .NET Core
20+
uses: actions/setup-dotnet@v4
21+
with:
22+
dotnet-version: |
23+
3.1.x
24+
5.0.x
25+
- name: Install dependencies
26+
run: dotnet restore src/GeoJSON.Net.sln
27+
- name: Build
28+
run: dotnet build src/GeoJSON.Net.sln -c Release --no-restore -p:Version=$(git describe --tags)
29+
- name: Test
30+
run: dotnet test src/GeoJSON.Net.sln --no-restore --verbosity normal
1531

32+
winBuild:
33+
runs-on: windows-latest
1634
steps:
1735
- uses: actions/checkout@v2
36+
with:
37+
fetch-depth: 0
1838
- name: Setup .NET Core
1939
uses: actions/setup-dotnet@v4
2040
with:
@@ -24,6 +44,11 @@ jobs:
2444
- name: Install dependencies
2545
run: dotnet restore src/GeoJSON.Net.sln
2646
- name: Build
27-
run: dotnet build src/GeoJSON.Net.sln --configuration Release --no-restore
47+
run: dotnet build src/GeoJSON.Net.sln -c Release --no-restore -p:Version=$(git describe --tags)
48+
- name: Upload package
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: nupkg
52+
path: ./src/GeoJSON.Net/bin/Release/*.nupkg
2853
- name: Test
2954
run: dotnet test src/GeoJSON.Net.sln --no-restore --verbosity normal

0 commit comments

Comments
 (0)