-
Notifications
You must be signed in to change notification settings - Fork 266
43 lines (34 loc) · 1.25 KB
/
Lagrange.Core-nuget-push.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
41
42
43
name: Lagrange.Core NuGet Push
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.100
- name: Build and Pack
run: |
cd ./Lagrange.Core
dotnet build --configuration Release
dotnet pack --configuration Release
dotnet pack --configuration Release -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
ls
ls ./bin/Release/
- name: Install Nuget
uses: nuget/setup-nuget@v1
with:
nuget-version: '5.x'
- name: Add private GitHub registry to NuGet
run: |
nuget sources add -name github -Source https://nuget.pkg.github.com/Linwenxuan05/index.json -Username Linwenxuan05 -Password ${{ secrets.GITHUB_TOKEN }}
- name: Push generated package to GitHub registry and NuGet
run: |
nuget push .\Lagrange.Core\bin\Release\*.nupkg -Source github -SkipDuplicate
nuget push .\Lagrange.Core\bin\Release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NUGETAPIKEY }}