From 1ee2f98afb651582a22891b0b2527ede03ad7da3 Mon Sep 17 00:00:00 2001 From: lindexi Date: Sun, 22 Aug 2021 19:54:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dotnet-build.yml | 17 ++++++++ .github/workflows/nuget-master-publish.yml | 40 +++++++++++++++++++ .github/workflows/nuget-tag-publish.yml | 39 ++++++++++++++++++ CHANGELOG.md | 1 + Directory.Build.props | 17 ++++++++ README.md | 5 +++ build/Version.props | 5 +++ dotnetCampus.ApplicationStartupManager.sln | 30 ++++++++++++++ .../Class1.cs | 9 +++++ ...netCampus.ApplicationStartupManager.csproj | 36 +++++++++++++++++ 10 files changed, 199 insertions(+) create mode 100644 .github/workflows/dotnet-build.yml create mode 100644 .github/workflows/nuget-master-publish.yml create mode 100644 .github/workflows/nuget-tag-publish.yml create mode 100644 CHANGELOG.md create mode 100644 Directory.Build.props create mode 100644 README.md create mode 100644 build/Version.props create mode 100644 dotnetCampus.ApplicationStartupManager.sln create mode 100644 src/dotnetCampus.ApplicationStartupManager/Class1.cs create mode 100644 src/dotnetCampus.ApplicationStartupManager/dotnetCampus.ApplicationStartupManager.csproj diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml new file mode 100644 index 0000000..d1794a4 --- /dev/null +++ b/.github/workflows/dotnet-build.yml @@ -0,0 +1,17 @@ +name: .NET Build + +on: [push, pull_request] + +jobs: + build: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v1 + + - name: Build with dotnet + run: dotnet build --configuration Release + + - name: Test + run: dotnet test --configuration Release \ No newline at end of file diff --git a/.github/workflows/nuget-master-publish.yml b/.github/workflows/nuget-master-publish.yml new file mode 100644 index 0000000..9b5e85c --- /dev/null +++ b/.github/workflows/nuget-master-publish.yml @@ -0,0 +1,40 @@ +# 去掉注释可以合并 master 分支自动打包 +# 为什么不期望推送 master 自动打包?原因是打出来的 CBB 没有 Tag 不利于回滚找到代码 + +# name: publish nuget + +# on: +# push: +# branches: +# - master + +# jobs: +# build: + +# runs-on: windows-latest + +# steps: +# - uses: actions/checkout@v1 + +# - name: Setup .NET Core +# uses: actions/setup-dotnet@v1 +# with: +# dotnet-version: 3.1.300 + +# - name: Build with dotnet +# run: | +# dotnet build --configuration Release +# dotnet pack --configuration Release --no-build + +# - name: Install Nuget +# uses: nuget/setup-nuget@v1 +# with: +# nuget-version: '5.x' + +# - name: Add private GitHub registry to NuGet +# run: | +# nuget sources add -name github -Source https://nuget.pkg.github.com/dotnet-campus/index.json -Username dotnet-campus -Password ${{ secrets.GITHUB_TOKEN }} +# - name: Push generated package to GitHub registry +# run: | +# nuget push .\bin\Release\*.nupkg -Source github -SkipDuplicate +# nuget push .\bin\Release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }} diff --git a/.github/workflows/nuget-tag-publish.yml b/.github/workflows/nuget-tag-publish.yml new file mode 100644 index 0000000..2a0cc6f --- /dev/null +++ b/.github/workflows/nuget-tag-publish.yml @@ -0,0 +1,39 @@ +name: publish nuget + +on: + push: + tags: + - '*' + +jobs: + build: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v1 + + - name: Install dotnet tool + run: dotnet tool install -g dotnetCampus.TagToVersion + + - name: Set tag to version + run: dotnet TagToVersion -t ${{ github.ref }} + + - name: Build with dotnet + run: | + dotnet build --configuration Release + dotnet pack --configuration Release --no-build + + - name: Install Nuget + uses: nuget/setup-nuget@v1 + with: + nuget-version: '5.x' + + - name: Add private GitHub registry to NuGet + run: | + nuget sources add -name github -Source https://nuget.pkg.github.com/dotnet-campus/index.json -Username dotnet-campus -Password ${{ secrets.GITHUB_TOKEN }} + + - name: Push generated package to GitHub registry + run: | + nuget push .\bin\Release\*.nupkg -Source github -SkipDuplicate + nuget push .\bin\Release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..6fd8cb9 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ +# dotnetCampus.ApplicationStartupManager \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..abaaf0c --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,17 @@ + + + + latest + $(MSBuildThisFileDirectory)bin\$(Configuration) + dotnet campus(.NET 职业技术学院) + + + dotnet-campus + https://github.com/dotnet-campus/dotnetCampus.ApplicationStartupManager + https://github.com/dotnet-campus/dotnetCampus.ApplicationStartupManager + TODO: 请在此处添加包描述信息。 + + git + Copyright © 2021 dotnet campus, All Rights Reserved. + + \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..6caf38c --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# dotnetCampus.ApplicationStartupManager + +| Build | NuGet | +|--|--| +|![](https://github.com/dotnet-campus/dotnetCampus.ApplicationStartupManager/workflows/.NET%20Build/badge.svg)|[![](https://img.shields.io/nuget/v/dotnetCampus.ApplicationStartupManager.svg)](https://www.nuget.org/packages/dotnetCampus.ApplicationStartupManager)| \ No newline at end of file diff --git a/build/Version.props b/build/Version.props new file mode 100644 index 0000000..0a14750 --- /dev/null +++ b/build/Version.props @@ -0,0 +1,5 @@ + + + 1.0.0 + + \ No newline at end of file diff --git a/dotnetCampus.ApplicationStartupManager.sln b/dotnetCampus.ApplicationStartupManager.sln new file mode 100644 index 0000000..163d9e4 --- /dev/null +++ b/dotnetCampus.ApplicationStartupManager.sln @@ -0,0 +1,30 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31605.320 +MinimumVisualStudioVersion = 15.0.26124.0 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5D196596-756D-45C2-8A05-C8E4AB8A36E6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetCampus.ApplicationStartupManager", "src\dotnetCampus.ApplicationStartupManager\dotnetCampus.ApplicationStartupManager.csproj", "{F7ED61F4-920C-49EB-8DC1-74B2BE6AF272}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F7ED61F4-920C-49EB-8DC1-74B2BE6AF272}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F7ED61F4-920C-49EB-8DC1-74B2BE6AF272}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F7ED61F4-920C-49EB-8DC1-74B2BE6AF272}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F7ED61F4-920C-49EB-8DC1-74B2BE6AF272}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {F7ED61F4-920C-49EB-8DC1-74B2BE6AF272} = {5D196596-756D-45C2-8A05-C8E4AB8A36E6} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8AAD3A7E-EBB6-4125-9048-4CDE053D079B} + EndGlobalSection +EndGlobal diff --git a/src/dotnetCampus.ApplicationStartupManager/Class1.cs b/src/dotnetCampus.ApplicationStartupManager/Class1.cs new file mode 100644 index 0000000..1bdc3ed --- /dev/null +++ b/src/dotnetCampus.ApplicationStartupManager/Class1.cs @@ -0,0 +1,9 @@ +using System; + +namespace dotnetCampus.ApplicationStartupManager +{ + class Class1 + { + + } +} diff --git a/src/dotnetCampus.ApplicationStartupManager/dotnetCampus.ApplicationStartupManager.csproj b/src/dotnetCampus.ApplicationStartupManager/dotnetCampus.ApplicationStartupManager.csproj new file mode 100644 index 0000000..611af2f --- /dev/null +++ b/src/dotnetCampus.ApplicationStartupManager/dotnetCampus.ApplicationStartupManager.csproj @@ -0,0 +1,36 @@ + + + + netcoreapp3.1;netstandard2.0;net45 + true + + true + + + + + + + true + + + true + + + + + + true + + + + true + snupkg + + + + + + + +