ShaoHans is publishing a nuget package 🚀 #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 发布新的 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 |