Branch management and version strings
This commit is contained in:
parent
9a8be857b8
commit
3c028704f2
4 changed files with 7 additions and 2 deletions
|
@ -4,6 +4,9 @@ inputs:
|
|||
assemblyInfoPath:
|
||||
description: 'Path to a .NET style AssemblyInfo file containing the numeric version component.'
|
||||
required: true
|
||||
primaryBranch:
|
||||
description: 'Name of the primary branch, the one that is published without any version string prefix.'
|
||||
default: 'master'
|
||||
outputs:
|
||||
versionstring:
|
||||
description: 'The generated version string'
|
||||
|
|
|
@ -4,5 +4,5 @@ Import-Module Axinom.DevOpsTooling
|
|||
|
||||
$path = Join-Path $env:GITHUB_WORKSPACE $env:INPUT_ASSEMBLYINFOPATH
|
||||
|
||||
$version = Set-DotNetBuildAndVersionStrings -assemblyInfoPath $path -commitId $ENV:GITHUB_SHA
|
||||
$version = Set-DotNetBuildAndVersionStrings -assemblyInfoPath $path -commitId $ENV:GITHUB_SHA -primaryBranchName $env:INPUT_PRIMARYBRANCH
|
||||
Write-Host "::set-output name=versionstring::$version"
|
|
@ -1,6 +1,6 @@
|
|||
on:
|
||||
push:
|
||||
branches: ['publish-latest']
|
||||
branches: ['latest']
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -10,6 +10,7 @@ jobs:
|
|||
uses: ./.github/actions/make-version-string
|
||||
with:
|
||||
assemblyInfoPath: AssemblyInfo.cs
|
||||
primaryBranch: 'latest'
|
||||
- uses: ./.github/actions/expand-tokens
|
||||
env:
|
||||
VERSIONSTRING: ${{ steps.make_version_string.outputs.versionstring }}
|
1
.github/workflows/push-to-master.yml
vendored
1
.github/workflows/push-to-master.yml
vendored
|
@ -10,6 +10,7 @@ jobs:
|
|||
uses: ./.github/actions/make-version-string
|
||||
with:
|
||||
assemblyInfoPath: AssemblyInfo.cs
|
||||
primaryBranch: 'latest'
|
||||
- uses: ./.github/actions/expand-tokens
|
||||
env:
|
||||
VERSIONSTRING: ${{ steps.make_version_string.outputs.versionstring }}
|
||||
|
|
Loading…
Add table
Reference in a new issue