fixed release version in pipeline
Release / release (push) Failing after 2m19s

This commit is contained in:
2026-08-11 15:56:23 +05:00
parent cb39198e0a
commit 3bf2018a62
3 changed files with 20 additions and 12 deletions
+12 -8
View File
@@ -1,5 +1,6 @@
# The release: a tag of the form v1.2.3.0 builds the solution, runs the tests
# and packs the MSIX with the version taken from the tag.
# The release: a tag of the form v1.2.3 builds the solution, runs the tests and
# packs the MSIX with the version taken from the tag — three numbers of the tag
# and a zero the Store keeps for itself.
#
# The same requirements to the runner as in pull-request.yml apply: Windows, the
# .NET 10 SDK and an interactive desktop session for the tests. makeappx comes
@@ -58,20 +59,23 @@ jobs:
throw "Git LFS left pointers instead of files: $($pointers -join ', ')."
}
# The tag is the only place the version comes from: the Store takes four
# numbers ending in zero, so anything else is stopped here rather than
# halfway through the packaging
# The tag is the only place the version comes from, and it is a plain
# version of three numbers — the same shape the application itself looks
# for in the releases when it checks for an update. A tag of any other
# shape is stopped here rather than halfway through the packaging
- name: Read the version from the tag
id: version
run: |
$ErrorActionPreference = 'Stop'
$tag = '${{ github.ref_name }}'
if ($tag -notmatch '^v\d+\.\d+\.\d+\.0$') {
throw "The tag '$tag' does not fit: a release is tagged as v1.2.3.0four numbers ending in zero."
if ($tag -notmatch '^v\d+\.\d+\.\d+$') {
throw "The tag '$tag' does not fit: a release is tagged as v1.2.3 — three numbers. A fourth one does not belong in the tag: the Store keeps the revision for itself, and the package always gets a zero there."
}
"version=$($tag.Substring(1))" | Out-File $env:GITHUB_OUTPUT -Append -Encoding utf8
# The package takes four numbers with a zero at the end: the Store
# reserves the last one, so it carries nothing the tag could tell
"version=$($tag.Substring(1)).0" | Out-File $env:GITHUB_OUTPUT -Append -Encoding utf8
- name: Show the toolchain
run: dotnet --info