Use MinVer
This commit is contained in:
Родитель
d49d552965
Коммит
6521c1cdef
|
@ -52,31 +52,15 @@ jobs:
|
|||
git fetch --prune --unshallow
|
||||
git submodule -q update --init --recursive
|
||||
|
||||
- name: Fetch Tags for GitVersion
|
||||
run: |
|
||||
git fetch --tags
|
||||
|
||||
- name: Fetch master for GitVersion
|
||||
if: github.ref != 'refs/heads/master'
|
||||
run: git branch --create-reflog master origin/master
|
||||
|
||||
- name: Install GitVersion
|
||||
uses: gittools/actions/gitversion/setup@v0.9.3
|
||||
with:
|
||||
versionSpec: "5.3.x"
|
||||
|
||||
- name: Use GitVersion
|
||||
id: gitversion # step id used as reference for output values
|
||||
uses: gittools/actions/gitversion/execute@v0.9.3
|
||||
|
||||
- name: Setup DotNet SDK
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: "3.1.101"
|
||||
dotnet-version: "3.1.x"
|
||||
|
||||
- name: Build
|
||||
shell: pwsh
|
||||
run: ./ci-build.ps1 "${{steps.gitversion.outputs.nuGetVersion}}" "${{matrix.options.framework}}"
|
||||
if: startsWith(github.ref, 'refs/tags/') == false
|
||||
run: ./ci-build.ps1 "${{matrix.options.framework}}"
|
||||
|
||||
- name: Test
|
||||
shell: pwsh
|
||||
|
@ -112,31 +96,14 @@ jobs:
|
|||
git fetch --prune --unshallow
|
||||
git submodule -q update --init --recursive
|
||||
|
||||
- name: Fetch Tags for GitVersion
|
||||
run: |
|
||||
git fetch --tags
|
||||
|
||||
- name: Fetch master for GitVersion
|
||||
if: github.ref != 'refs/heads/master'
|
||||
run: git branch --create-reflog master origin/master
|
||||
|
||||
- name: Install GitVersion
|
||||
uses: gittools/actions/gitversion/setup@v0.9.3
|
||||
with:
|
||||
versionSpec: "5.3.x"
|
||||
|
||||
- name: Use GitVersion
|
||||
id: gitversion # step id used as reference for output values
|
||||
uses: gittools/actions/gitversion/execute@v0.9.3
|
||||
|
||||
- name: Setup DotNet SDK
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: "3.1.101"
|
||||
dotnet-version: "3.1.x"
|
||||
|
||||
- name: Pack
|
||||
shell: pwsh
|
||||
run: ./ci-pack.ps1 "${{steps.gitversion.outputs.nuGetVersion}}"
|
||||
run: ./ci-pack.ps1
|
||||
|
||||
- name: Publish to MyGet
|
||||
shell: pwsh
|
||||
|
|
|
@ -29,6 +29,12 @@
|
|||
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--MinVer Properties for versioning-->
|
||||
<PropertyGroup>
|
||||
<MinVerTagPrefix>v</MinVerTagPrefix>
|
||||
<MinVerVerbosity>normal</MinVerVerbosity>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
https://apisof.net/
|
||||
+===================+=======+==========+=====================+=============+=================+====================+==============+=========+
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
<PackageReference Update="StyleCop.Analyzers" PrivateAssets="All" Version="1.1.118" />
|
||||
|
||||
<!--Src Dependencies-->
|
||||
<PackageReference Update="MinVer" PrivateAssets="All" Version="2.3.0" />
|
||||
<PackageReference Update="System.Buffers" Version="4.5.0" />
|
||||
<PackageReference Update="System.IO.Compression" Version="4.3.0" />
|
||||
<PackageReference Update="System.IO.UnmanagedMemoryStream" Version="4.3.0" />
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
# Use mainline mode to match our development approach.
|
||||
# https://gitversion.readthedocs.io/en/latest/input/docs/reference/versioning-modes/mainline-development/
|
||||
mode: Mainline
|
||||
continuous-delivery-fallback-tag: ci
|
||||
branches:
|
||||
master:
|
||||
tag: unstable
|
||||
pull-request:
|
||||
tag: pr
|
|
@ -1,7 +1,5 @@
|
|||
param(
|
||||
[Parameter(Mandatory, Position = 0)]
|
||||
[string]$version,
|
||||
[Parameter(Mandatory = $true, Position = 1)]
|
||||
[Parameter(Mandatory = $true, Position = 0)]
|
||||
[string]$targetFramework
|
||||
)
|
||||
|
||||
|
@ -10,4 +8,4 @@ dotnet clean -c Release
|
|||
$repositoryUrl = "https://github.com/$env:GITHUB_REPOSITORY"
|
||||
|
||||
# Building for a specific framework.
|
||||
dotnet build -c Release -f $targetFramework /p:packageversion=$version /p:RepositoryUrl=$repositoryUrl
|
||||
dotnet build -c Release -f $targetFramework /p:RepositoryUrl=$repositoryUrl
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
param(
|
||||
[Parameter(Mandatory, Position = 0)]
|
||||
[string]$version
|
||||
)
|
||||
|
||||
dotnet clean -c Release
|
||||
|
||||
$repositoryUrl = "https://github.com/$env:GITHUB_REPOSITORY"
|
||||
|
||||
# Building for packing and publishing.
|
||||
dotnet pack -c Release --output "$PSScriptRoot/artifacts" /p:packageversion=$version /p:RepositoryUrl=$repositoryUrl
|
||||
dotnet pack -c Release --output "$PSScriptRoot/artifacts" /p:RepositoryUrl=$repositoryUrl
|
||||
|
|
|
@ -19,6 +19,10 @@
|
|||
<RootNamespace>SixLabors.ImageSharp</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MinVer" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" />
|
||||
</ItemGroup>
|
||||
|
|
Загрузка…
Ссылка в новой задаче