Skip to content

Commit a1c42f6

Browse files
committed
Added build for main branch.
1 parent a19fefe commit a1c42f6

File tree

2 files changed

+61
-1
lines changed

2 files changed

+61
-1
lines changed

.github/workflows/build-and-test.yml renamed to .github/workflows/develop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: .NET Core
1+
name: Prerelease
22

33
on:
44
push:

.github/workflows/main.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Prerelease
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
build-and-test:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
submodules: 'true'
16+
- name: Setup .NET Core 3.1
17+
uses: actions/setup-dotnet@v1
18+
with:
19+
dotnet-version: 3.1.x
20+
- name: Setup .NET 6.
21+
uses: actions/setup-dotnet@v1
22+
with:
23+
dotnet-version: 6.0.x
24+
- name: Restore packages.
25+
run: dotnet restore
26+
- name: Build all projects.
27+
run: dotnet build --configuration Release --no-restore
28+
- name: Unittests.
29+
run: dotnet test
30+
working-directory: ./test/OsmSharp.Test/
31+
- name: Functional tests.
32+
run: dotnet run -c release
33+
working-directory: ./test/OsmSharp.Test.Functional/
34+
- name: Sample.CompleteStream
35+
run: dotnet run -c release
36+
working-directory: ./samples/Sample.CompleteStream/
37+
- name: Sample.Filter
38+
run: dotnet run -c release
39+
working-directory: ./samples/Sample.Filter/
40+
- name: Sample.GeoFilter
41+
run: dotnet run -c release
42+
working-directory: ./samples/Sample.GeoFilter/
43+
- name: Sample.GeometryStream
44+
run: dotnet run -c release
45+
working-directory: ./samples/Sample.GeometryStream/
46+
- name: Sample.GeometryStream.Shape
47+
run: dotnet run -c release
48+
working-directory: ./samples/Sample.GeometryStream.Shape/
49+
- name: Nuget Pack
50+
run: dotnet pack -c release
51+
working-directory: ./src/OsmSharp/
52+
- name: Nuget Pack
53+
run: dotnet pack -c release
54+
working-directory: ./src/OsmSharp.Geo/
55+
- name: Nuget push Github Packages
56+
run: dotnet nuget push **/*.nupkg --skip-duplicate -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/osmsharp/index.json
57+
working-directory: ./src/
58+
- name: Nuget push Nuget.org
59+
run: dotnet nuget push **/*.nupkg --skip-duplicate -k ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json
60+
working-directory: ./src/

0 commit comments

Comments
 (0)