Skip to content

ShaoHans is publishing a nuget package 🚀 #15

ShaoHans is publishing a nuget package 🚀

ShaoHans is publishing a nuget package 🚀 #15

Workflow file for this run

# 发布新的 nuget 包
name: publish-nuget
run-name: ${{ github.actor }} is publishing a nuget package 🚀
on:
push:
tags:
- 'v*'
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