-
Notifications
You must be signed in to change notification settings - Fork 199
40 lines (33 loc) · 1.12 KB
/
dotnetcore.yml
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
name: .NET Core
on:
push:
branches:
- master
jobs:
nuget:
name: Build & Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.*
- name: Generate build number
id: buildnumber
uses: einaregilsson/build-number@v3
with:
token: ${{secrets.github_token}}
- name: Dotnet Restore
working-directory: src/MiNET/MiNET
run: dotnet restore
- name: Build & Pack
working-directory: src/MiNET/MiNET
run: |
export PKG_VERSION=1.0.${{ steps.buildnumber.outputs.build_number }}
dotnet build --configuration Release
dotnet pack --configuration Release -o ./nuget -p:PackageVersion="$PKG_VERSION" --include-symbols --include-source
- name: Publish Artifacts
shell: bash
working-directory: src/MiNET/MiNET
run: dotnet nuget push ./nuget/*.symbols.nupkg -s "https://api.nuget.org/v3/index.json" -k ${{ secrets.NUGET_KEY }} --skip-duplicate