Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 161c73f

Browse files
committed
打包代码
1 parent 9983080 commit 161c73f

2 files changed

Lines changed: 32 additions & 1 deletion

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Manual pack to nuget
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Package Version"
8+
required: true
9+
type: string
10+
11+
jobs:
12+
pack-push-nuget-package:
13+
runs-on: ubuntu-latest
14+
if: github.repository_owner == 'tdesign-blazor'
15+
steps:
16+
- name: 迁出代码
17+
uses: actions/checkout@v2
18+
19+
- name: Setup .NET Environment
20+
uses: actions/setup-dotnet@v1
21+
with:
22+
dotnet-version: |
23+
6.0.x
24+
7.0.x
25+
- name: 发布 nuget 包
26+
run: |
27+
dotnet build ./src/TDesign.Pro/TDesign.Pro.csproj -c release
28+
dotnet pack ./src/TDesign.Pro/TDesign.Pro.csproj -c release -o ./pack -p:PackageVersion=${{ github.event.inputs.version }}
29+
dotnet nuget push './pack/*.nupkg' -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate
30+
31+

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
VERSION=`git describe --tags`
2626
echo "Publishing Version: ${VERSION}"
2727
dotnet build -c release
28-
dotnet pack ./src/TDesign.Pro/TDesign.Pro.csproj -c release -o ./pack -p:PackageVersion=$Version
28+
dotnet pack ./src/TDesign.Pro/TDesign.Pro.csproj -c release -o ./pack -p:PackageVersion=${VERSION}
2929
dotnet nuget push './pack/*.nupkg' -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate
3030
3131

0 commit comments

Comments
 (0)