Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/build-docker-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
secrets: inherit
with:
ref: ${{ inputs.ref }}
branch: ${{ inputs.branch }}

build-docker:
name: Build Docker image job
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-executable-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
secrets: inherit
with:
ref: ${{ inputs.ref }}
branch: ${{ inputs.branch }}

build-executable-matrix:
name: Build executable project matrix job
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-nugetlibrary-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
uses: ./.github/workflows/get-version-task.yml
with:
ref: ${{ inputs.ref }}
branch: ${{ inputs.branch }}

build-nugetlibrary:
name: Build NuGet library project job
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-pypilibrary-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
uses: ./.github/workflows/get-version-task.yml
with:
ref: ${{ inputs.ref }}
branch: ${{ inputs.branch }}

build-pypilibrary:
name: Build PyPI library project job
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-release-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ jobs:
secrets: inherit
with:
ref: ${{ inputs.ref }}
branch: ${{ inputs.branch }}

# Entry gate: validate branch<->version consistency once, before the build jobs, so an NBGV mis-classification fails
# fast instead of after building and publishing. main must be a public release (no prerelease '-'); every other branch
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/get-version-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ on:
required: false
type: string
default: ''
# Logical branch NBGV classifies against. Pins PublicRelease to this branch instead of the runner's GITHUB_REF,
# which on a publish dispatched from the default branch is that branch for every matrix leg. Empty keeps GITHUB_REF.
branch:
required: false
type: string
default: ''
outputs:
SemVer2:
value: ${{ jobs.get-version.outputs.SemVer2 }}
Expand Down Expand Up @@ -59,7 +53,8 @@ jobs:
id: nbgv
uses: dotnet/nbgv@master
env:
# NBGV reads the branch from GITHUB_REF; pin it to the leg being versioned so a publish dispatched from the
# default branch doesn't classify every leg as the public ref and strip its prerelease suffix.
GITHUB_REF: ${{ inputs.branch != '' && format('refs/heads/{0}', inputs.branch) || github.ref }}
GITHUB_REF_NAME: ${{ inputs.branch != '' && inputs.branch || github.ref_name }}
# Version from the checked-out branch, not the CI ref. GITHUB_REF is reserved and a step env can't reliably
# override it (the runner re-injects the dispatch ref), so on a publish dispatched from the default branch NBGV
# would classify every leg as the public ref. IGNORE_GITHUB_REF makes NBGV ignore GITHUB_REF and use the
# checked-out branch, which each matrix leg already is. The validate-release gate backstops any misclassification.
IGNORE_GITHUB_REF: "true"