Skip to content

Commit c167439

Browse files
committed
Added action to release.
1 parent 40e8523 commit c167439

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: .NET Core
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 6.
17+
uses: actions/setup-dotnet@v1
18+
with:
19+
dotnet-version: 6.0.x
20+
- name: Restore packages.
21+
run: dotnet restore
22+
- name: Build all projects.
23+
run: dotnet build --configuration Release --no-restore
24+
25+
- name: Unittests.
26+
run: dotnet test
27+
working-directory: ./test/OpenLR.Test/
28+
29+
- name: Nuget Pack
30+
run: dotnet pack -c release
31+
working-directory: ./src/OpenLR/
32+
- name: Nuget Pack
33+
run: dotnet pack -c release
34+
working-directory: ./src/OpenLR.Geo/
35+
36+
- name: Nuget push Github
37+
run: dotnet nuget push **/*.nupkg --skip-duplicate -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/itinero/index.json
38+
working-directory: ./src/
39+
40+
- name: Nuget push
41+
run: dotnet nuget push **/*.nupkg --skip-duplicate -k ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json
42+
working-directory: ./src/

0 commit comments

Comments
 (0)