-
Notifications
You must be signed in to change notification settings - Fork 92
76 lines (71 loc) · 2.58 KB
/
Copy pathdevelop.yml
File metadata and controls
76 lines (71 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Prerelease
on:
push:
branches: [ develop ]
jobs:
build-and-test:
runs-on: ubuntu-latest
permissions:
id-token: write # enable GitHub OIDC token issuance for nuget.org trusted publishing
contents: read # explicit read for actions/checkout under least-privilege
packages: write # for the GitHub Packages push below
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 3.1.x
- name: Setup .NET 6.
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Setup .NET 10.
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Restore packages.
run: dotnet restore
- name: Build all projects.
run: dotnet build --configuration Release --no-restore
- name: Run dotnet format
run: dotnet format --verify-no-changes --verbosity diagnostic --no-restore
- name: Unittests.
run: dotnet test
working-directory: ./test/OsmSharp.Test/
- name: Functional tests.
run: dotnet run -c release
working-directory: ./test/OsmSharp.Test.Functional/
- name: Sample.CompleteStream
run: dotnet run -c release
working-directory: ./samples/Sample.CompleteStream/
- name: Sample.Filter
run: dotnet run -c release
working-directory: ./samples/Sample.Filter/
- name: Sample.GeoFilter
run: dotnet run -c release
working-directory: ./samples/Sample.GeoFilter/
- name: Sample.GeometryStream
run: dotnet run -c release
working-directory: ./samples/Sample.GeometryStream/
- name: Sample.GeometryStream.Shape
run: dotnet run -c release
working-directory: ./samples/Sample.GeometryStream.Shape/
- name: Nuget Pack
run: dotnet pack -c release
working-directory: ./src/OsmSharp/
- name: Nuget Pack
run: dotnet pack -c release
working-directory: ./src/OsmSharp.Geo/
- name: Nuget push Github Packages
run: dotnet nuget push **/*.nupkg --skip-duplicate -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/osmsharp/index.json
working-directory: ./src/
- name: NuGet login (OIDC → temp API key)
uses: NuGet/login@v1
id: nuget-login
with:
user: ${{ secrets.NUGET_USER }}
- name: Nuget push Nuget.org
run: dotnet nuget push **/*.nupkg --skip-duplicate --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
working-directory: ./src/