调整github Action
This commit is contained in:
parent
02ce443289
commit
1115b201be
|
@ -14,20 +14,22 @@ jobs:
|
|||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v2
|
||||
- name: Setup dotNET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 7.0.x
|
||||
- name: Restore
|
||||
run: |
|
||||
dotnet restore Stardust/Stardust.csproj
|
||||
dotnet restore Stardust.Extensions/Stardust.Extensions.csproj
|
||||
- name: Get Version
|
||||
id: ver
|
||||
run: echo ::set-output name=VERSION::$(date "+%Y.%m%d-beta%H%M")
|
||||
- name: Build
|
||||
run: |
|
||||
dotnet pack --no-restore --version-suffix $(date "+%Y.%m%d-beta%H%M") -c Release -o out Stardust/Stardust.csproj
|
||||
dotnet pack --no-restore --version-suffix $(date "+%Y.%m%d-beta%H%M") -c Release -o out Stardust.Extensions/Stardust.Extensions.csproj
|
||||
dotnet build -c Release --version-suffix ${{ steps.ver.outputs.VERSION }}
|
||||
- name: Pack
|
||||
run: |
|
||||
dotnet pack --no-build --version-suffix ${{ steps.ver.outputs.VERSION }} -o out Stardust/Stardust.csproj
|
||||
dotnet pack --no-build --version-suffix ${{ steps.ver.outputs.VERSION }} -o out Stardust.Extensions/Stardust.Extensions.csproj
|
||||
|
||||
- name: Publish
|
||||
run: |
|
||||
# dotnet nuget push ./out/*.nupkg --skip-duplicate --source https://nuget.pkg.github.com/NewLifeX/index.json --api-key ${{ github.token }}
|
||||
dotnet nuget push ./out/*.nupkg --skip-duplicate --source https://nuget.pkg.github.com/NewLifeX/index.json --api-key ${{ github.token }}
|
||||
dotnet nuget push ./out/*.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.nugetKey }}
|
||||
|
|
|
@ -7,25 +7,26 @@ on:
|
|||
|
||||
jobs:
|
||||
build-publish:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v2
|
||||
- name: Setup dotNET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 7.0.x
|
||||
- name: Restore
|
||||
run: |
|
||||
dotnet restore Stardust/Stardust.csproj
|
||||
dotnet restore Stardust.Extensions/Stardust.Extensions.csproj
|
||||
- name: Get Version
|
||||
id: ver
|
||||
run: echo ::set-output name=VERSION::$(date "+%Y.%m%d")
|
||||
- name: Build
|
||||
run: |
|
||||
dotnet pack --no-restore --version-suffix $(date "+%Y.%m%d") -c Release -o out Stardust/Stardust.csproj
|
||||
dotnet pack --no-restore --version-suffix $(date "+%Y.%m%d") -c Release -o out Stardust.Extensions/Stardust.Extensions.csproj
|
||||
dotnet build -c Release --version-suffix ${{ steps.ver.outputs.VERSION }}
|
||||
- name: Pack
|
||||
run: |
|
||||
dotnet pack --no-build --version-suffix ${{ steps.ver.outputs.VERSION }} -o out Stardust/Stardust.csproj
|
||||
dotnet pack --no-build --version-suffix ${{ steps.ver.outputs.VERSION }} -o out Stardust.Extensions/Stardust.Extensions.csproj
|
||||
|
||||
- name: Publish
|
||||
run: |
|
||||
# dotnet nuget push ./out/*.nupkg --skip-duplicate --source https://nuget.pkg.github.com/NewLifeX/index.json --api-key ${{ github.token }}
|
||||
dotnet nuget push ./out/*.nupkg --skip-duplicate --source https://nuget.pkg.github.com/NewLifeX/index.json --api-key ${{ github.token }}
|
||||
dotnet nuget push ./out/*.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.nugetKey }}
|
||||
|
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v2
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 7.0.x
|
||||
- name: Build
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
|
||||
<PackageReference Include="NewLife.Redis" Version="5.1.2023.203" />
|
||||
<PackageReference Include="NewLife.Redis" Version="5.1.2023.214-beta0217" />
|
||||
<PackageReference Include="xunit" Version="2.4.2" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
<!--<GenerateDocumentationFile>True</GenerateDocumentationFile>-->
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<IsPackable>False</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
<SignAssembly>True</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\Doc\newlife.snk</AssemblyOriginatorKeyFile>
|
||||
<IsPackable>False</IsPackable>
|
||||
<NoWarn>1701;1702;NU5104;NETSDK1138</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<IsPackable>False</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
|
||||
|
|
|
@ -12,12 +12,13 @@
|
|||
<FileVersion>$(Version)</FileVersion>
|
||||
<AssemblyVersion>$(VersionPrefix).*</AssemblyVersion>
|
||||
<Deterministic>false</Deterministic>
|
||||
<OutputPath>..\Bin</OutputPath>
|
||||
<!--<OutputPath>..\Bin</OutputPath>-->
|
||||
<DocumentationFile>$(OutputPath)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<IsPackable>False</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
<LangVersion>latest</LangVersion>
|
||||
<SignAssembly>True</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\Doc\newlife.snk</AssemblyOriginatorKeyFile>
|
||||
<NoWarn>1701;1702;NU5104;NETSDK1138</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
@ -40,7 +41,7 @@
|
|||
<PackageReadmeFile>Readme.MD</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ItemGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NewLife.Redis" Version="5.1.2023.203" />
|
||||
<PackageReference Include="NewLife.Redis" Version="5.1.2023.214-beta0217" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NewLife.Cube.Core" Version="5.5.2023.205" />
|
||||
<PackageReference Include="NewLife.Redis" Version="5.1.2023.203" />
|
||||
<PackageReference Include="NewLife.Cube.Core" Version="5.5.2023.214-beta0205" />
|
||||
<PackageReference Include="NewLife.Redis" Version="5.1.2023.214-beta0217" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
<LangVersion>latest</LangVersion>
|
||||
<SignAssembly>True</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\Doc\newlife.snk</AssemblyOriginatorKeyFile>
|
||||
<NoWarn>1701;1702;NU5104;NETSDK1138</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
@ -38,7 +39,7 @@
|
|||
<PackageReadmeFile>Readme.MD</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ItemGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<OutputPath>..\Bin\Test</OutputPath>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<IsPackable>False</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
Loading…
Reference in New Issue