Compare commits

..
3 Commits
Author SHA1 Message Date
xrain ee3a3a9d56 update build to .net5 2020-11-28 18:09:45 +08:00
xrain 61672c5770 update build to .net5 2020-11-28 18:05:49 +08:00
xrain c6b9746603 .netcoreapp 5 2020-11-28 18:03:20 +08:00
2 changed files with 4 additions and 14 deletions
+1 -13
View File
@@ -3,20 +3,7 @@ name: PublishNugetPackage
on: [create] on: [create]
jobs: jobs:
build:
name: Build Project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.100'
- name: Build
run: dotnet build
publish: publish:
needs: build
name: Publish Project to Nuget name: Publish Project to Nuget
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -27,6 +14,7 @@ jobs:
dotnet-version: '5.0.100' dotnet-version: '5.0.100'
- name: Publish - name: Publish
run: | run: |
dotnet build
version=`git describe --tags` version=`git describe --tags`
dotnet pack --configuration release -p:PackageVersion=$version dotnet pack --configuration release -p:PackageVersion=$version
dotnet nuget push bin/release/Simcu.SimApi.$version.nupkg -k ${NUGET_APIKEY} -s https://www.nuget.org/api/v2/package dotnet nuget push bin/release/Simcu.SimApi.$version.nupkg -k ${NUGET_APIKEY} -s https://www.nuget.org/api/v2/package
+3 -1
View File
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>netcoreapp5.0</TargetFramework>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<PackOnBuild>true</PackOnBuild> <PackOnBuild>true</PackOnBuild>
<Version>0.2.3</Version> <Version>0.2.3</Version>
@@ -13,6 +13,8 @@
<IncludeSymbols>true</IncludeSymbols> <IncludeSymbols>true</IncludeSymbols>
<ReleaseVersion>5.0.0</ReleaseVersion> <ReleaseVersion>5.0.0</ReleaseVersion>
<SynchReleaseVersion>false</SynchReleaseVersion> <SynchReleaseVersion>false</SynchReleaseVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageVersion>5.0.2</PackageVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(RunConfiguration)' == 'YYApi' " /> <PropertyGroup Condition=" '$(RunConfiguration)' == 'YYApi' " />