-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.77 KB
/
preview.yaml
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
name: .NET Pack & Push
on:
workflow_dispatch:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
env:
VERSION_SUFFIX: -preview.${{ github.run_number }}
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core SDK 6.0
uses: actions/[email protected]
with:
dotnet-version: '6.0.x'
- name: Install dependencies
run: dotnet restore
working-directory: ./src
- name: Build Debug
run: dotnet build --configuration Debug --no-restore --version-suffix $VERSION_SUFFIX
working-directory: ./src
- name: Build Release
run: dotnet build --configuration Release --no-restore --version-suffix $VERSION_SUFFIX
working-directory: ./src
- name: Create external annotations
run: |
dotnet run --no-build --project JetBrains.Annotations.Extractor -- Cornucopia.DataStructures/bin/Debug/netcoreapp3.1/Cornucopia.DataStructures.dll Cornucopia.DataStructures/bin/Release/netcoreapp3.1/Cornucopia.DataStructures.ExternalAnnotations.xml
dotnet run --no-build --project JetBrains.Annotations.Extractor -- Cornucopia.DataStructures/bin/Debug/netstandard1.1/Cornucopia.DataStructures.dll Cornucopia.DataStructures/bin/Release/netstandard1.1/Cornucopia.DataStructures.ExternalAnnotations.xml
working-directory: ./src
- name: Pack
run: dotnet pack --configuration Release --no-build --version-suffix $VERSION_SUFFIX
working-directory: ./src
- name: Test
run: dotnet test --configuration Release --no-build --verbosity normal
working-directory: ./src
- name: NuGet Push
run: dotnet nuget push **/*.nupkg --source NuGet.org --api-key $NUGET_TOKEN --skip-duplicate
working-directory: ./src