2020-06-29 00:00:10 +08:00
|
|
|
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
|
|
|
|
|
2020-11-12 17:38:05 +08:00
|
|
|
- name: Setup .NET 5
|
|
|
|
uses: actions/setup-dotnet@v1
|
|
|
|
with:
|
|
|
|
dotnet-version: 5.0.100
|
|
|
|
|
2020-06-29 00:00:10 +08:00
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: "10.x"
|
|
|
|
|
|
|
|
- name: Package and publish to Nuget📦
|
|
|
|
run: |
|
|
|
|
VERSION=`git describe --tags`
|
|
|
|
echo "Publishing Version: ${VERSION}"
|
|
|
|
npm install
|
2021-01-11 14:18:50 +08:00
|
|
|
dotnet build components/AntDesign.csproj
|
2021-01-11 13:22:35 +08:00
|
|
|
dotnet pack components/AntDesign.csproj /p:PackageVersion=$VERSION -c Release -o publish
|
2020-11-14 23:44:48 +08:00
|
|
|
dotnet nuget push publish/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY --skip-duplicate
|