[CI] Add nuget beta build support (#3113)
This commit is contained in:
9
.github/workflows/dotnet.yml
vendored
9
.github/workflows/dotnet.yml
vendored
@@ -1,8 +1,5 @@
|
|||||||
name: Dotnet Build
|
name: Dotnet Build
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["dev"]
|
branches: ["dev"]
|
||||||
@@ -35,6 +32,12 @@ jobs:
|
|||||||
- name: Is Tag Build
|
- name: Is Tag Build
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
run: echo "IsTagBuild=true" >> $GITHUB_ENV
|
run: echo "IsTagBuild=true" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Generate Beta Suffix
|
||||||
|
if: startsWith(github.ref, 'refs/tags/') && contains(github.ref_name, '/')
|
||||||
|
env:
|
||||||
|
REF_NAME: ${{ github.ref_name }}
|
||||||
|
run: echo "Suffix=${REF_NAME##*/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Generate Suffix
|
- name: Generate Suffix
|
||||||
if: env.IsTagBuild != 'true'
|
if: env.IsTagBuild != 'true'
|
||||||
|
|||||||
@@ -12,7 +12,8 @@
|
|||||||
<PackageReadmeFile>NUGET_README.md</PackageReadmeFile>
|
<PackageReadmeFile>NUGET_README.md</PackageReadmeFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(IsTagBuild)' == 'true' ">
|
<PropertyGroup Condition=" '$(IsTagBuild)' == 'true' ">
|
||||||
<VersionSuffix></VersionSuffix>
|
<VersionSuffix Condition=" '$(BuildNumber)' == '' "></VersionSuffix>
|
||||||
|
<VersionSuffix Condition=" '$(BuildNumber)' != '' ">$(BuildNumber)</VersionSuffix>
|
||||||
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
|
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(BuildNumber)' == '' And $(IsTagBuild) != 'true' ">
|
<PropertyGroup Condition=" '$(BuildNumber)' == '' And $(IsTagBuild) != 'true' ">
|
||||||
|
|||||||
Reference in New Issue
Block a user