forked from ant-design-blazor/ant-design-blazor
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) · 1.75 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Release
env:
NUGET_API_KEY: ${{secrets.NUGET_API_KEY}}
on:
push:
tags:
- "*"
jobs:
release-and-publish-package:
runs-on: ubuntu-latest
if: github.repository_owner == 'ant-design-blazor'
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.300
- name: Setup .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100
- name: Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.101
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.100
- uses: actions/setup-node@v1
with:
node-version: "10.x"
- name: Package and publish to Nuget📦
id: pack
run: |
VERSION=`git describe --tags`
echo "Publishing Version: ${VERSION}"
npm install
dotnet build
dotnet pack components/AntDesign.csproj /p:PackageVersion=$VERSION /p:ContinuousIntegrationBuild=true -c Release -o publish
dotnet pack tests/AntDesign.TestKit/AntDesign.TestKit.csproj /p:PackageVersion=$VERSION /p:ContinuousIntegrationBuild=true -c Release -o publish
dotnet pack src/AntDesign.Components.Authentication/AntDesign.Components.Authentication.csproj /p:PackageVersion=$VERSION /p:ContinuousIntegrationBuild=true -c Release -o publish
dotnet nuget push 'publish/*.nupkg' -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY --skip-duplicate
- name: Upload package artifact
uses: actions/upload-artifact@v2
with:
name: package
path: publish/
retention-days: 5