Skip to content

Commit 371775b

Browse files
committed
add release action
1 parent 402ab76 commit 371775b

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release
2+
3+
env:
4+
NUGET_API_KEY: ${{secrets.NUGET_API_KEY}}
5+
6+
on:
7+
push:
8+
tags:
9+
- '*'
10+
11+
jobs:
12+
release-and-publish-package:
13+
runs-on: ubuntu-latest
14+
if: github.repository_owner == 'ant-design-blazor'
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Setup .NET Core
20+
uses: actions/setup-dotnet@v1
21+
with:
22+
dotnet-version: 3.1.300
23+
24+
- uses: actions/setup-dotnet@v1
25+
with:
26+
dotnet-version: 5.0.100
27+
28+
- uses: actions/setup-node@v1
29+
with:
30+
node-version: "10.x"
31+
32+
- name: Package and publish to Nuget📦
33+
run: |
34+
VERSION=`git describe --tags`
35+
echo "Publishing Version: ${VERSION}"
36+
npm install
37+
dotnet build
38+
rm -rf ./node_modules
39+
dotnet pack src/layout/src/AntDesign.ProLayout.csproj /p:PackageVersion=$VERSION -c Release -o publish
40+
dotnet nuget push publish/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY --skip-duplicate

0 commit comments

Comments
 (0)