-
Notifications
You must be signed in to change notification settings - Fork 7
30 lines (25 loc) · 1.32 KB
/
publish-nuget.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
# 发布新的 nuget 包
name: publish-nuget
run-name: ${{ github.actor }} is publishing a nuget package 🚀
on: [push]
jobs:
publish-nuget-packages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore ./src/Abp.Blazor.Server.RadzenUI/Abp.Blazor.Server.RadzenUI.csproj
- name: Build
run: dotnet build --no-restore -c Release ./src/Abp.Blazor.Server.RadzenUI/Abp.Blazor.Server.RadzenUI.csproj
- name: Create the package
run: dotnet pack -c Release ./src/Abp.Blazor.Server.RadzenUI/Abp.Blazor.Server.RadzenUI.csproj
- name: Add nuget source
run: dotnet nuget add source --username ShaoHans --password ${{ secrets.NUGET_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/ShaoHans/index.json"
- name: Publish the package to Github Packages
run: dotnet nuget push ./src/Abp.Blazor.Server.RadzenUI/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --source github --skip-duplicate
- name: Publish the package to Nuget Gallery
run: dotnet nuget push ./src/Abp.Blazor.Server.RadzenUI/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_GALLERY_TOKEN }} --source nuget.org --skip-duplicate