-
Notifications
You must be signed in to change notification settings - Fork 274
39 lines (31 loc) · 1.27 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
name: Lagrange.Core NuGet Push
on:
push:
branches:
- master
paths:
- "Lagrange.Core/**"
- "Lagrange.Core.sln"
- "LICENSE"
- "README.md"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Pack
run: |
dotnet build -c Release Lagrange.Core
dotnet pack -c Release Lagrange.Core
dotnet pack -c Release -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg Lagrange.Core
- name: Add private GitHub registry to NuGet
run: dotnet nuget add source --username Linwenxuan05 --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/LagrangeDev/index.json"
- name: Push generated package to GitHub registry
run: dotnet nuget push ./Lagrange.Core/bin/Release/*.nupkg --source "github" --skip-duplicate --api-key ${{ secrets.GIT_TOKEN }}
- name: Push generated package to NuGet
run: dotnet nuget push ./Lagrange.Core/bin/Release/*.nupkg --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{ secrets.NUGETAPIKEY }}