From f2db1398cde764e9b019e9ba8d51676918ac4e47 Mon Sep 17 00:00:00 2001 From: ShaoHans <635260101@qq.com> Date: Tue, 15 Oct 2024 15:33:20 +0800 Subject: [PATCH] Create publish-nuget.yml --- .github/workflows/publish-nuget.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/publish-nuget.yml diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml new file mode 100644 index 0000000..a262cba --- /dev/null +++ b/.github/workflows/publish-nuget.yml @@ -0,0 +1,28 @@ +# 发布新的 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.RadzenUI.Blazor.Server/Abp.RadzenUI.Blazor.Server.csproj + - name: Build + run: dotnet build --no-restore -c Release ./src/Abp.RadzenUI.Blazor.Server/Abp.RadzenUI.Blazor.Server.csproj + - name: Create the package + run: dotnet pack -c Release ./src/Abp.RadzenUI.Blazor.Server/Abp.RadzenUI.Blazor.Server.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.RadzenUI.Blazor.Server/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --source github --skip-duplicate