submodule对gitea不管用,所以直接拉了一份拉格兰
This commit is contained in:
39
Lagrange.Core/.github/workflows/Lagrange.Core-nuget-push.yml
vendored
Normal file
39
Lagrange.Core/.github/workflows/Lagrange.Core-nuget-push.yml
vendored
Normal file
@@ -0,0 +1,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 }}
|
||||
Reference in New Issue
Block a user