This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
# The release: a tag of the form v1.2.3.0 builds the solution, runs the tests
|
# The release: a tag of the form v1.2.3 builds the solution, runs the tests and
|
||||||
# and packs the MSIX with the version taken from the tag.
|
# 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
|
# 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
|
# .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 ', ')."
|
throw "Git LFS left pointers instead of files: $($pointers -join ', ')."
|
||||||
}
|
}
|
||||||
|
|
||||||
# The tag is the only place the version comes from: the Store takes four
|
# The tag is the only place the version comes from, and it is a plain
|
||||||
# numbers ending in zero, so anything else is stopped here rather than
|
# version of three numbers — the same shape the application itself looks
|
||||||
# halfway through the packaging
|
# 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
|
- name: Read the version from the tag
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
$ErrorActionPreference = 'Stop'
|
$ErrorActionPreference = 'Stop'
|
||||||
$tag = '${{ github.ref_name }}'
|
$tag = '${{ github.ref_name }}'
|
||||||
|
|
||||||
if ($tag -notmatch '^v\d+\.\d+\.\d+\.0$') {
|
if ($tag -notmatch '^v\d+\.\d+\.\d+$') {
|
||||||
throw "The tag '$tag' does not fit: a release is tagged as v1.2.3.0 — four numbers ending in zero."
|
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
|
- name: Show the toolchain
|
||||||
run: dotnet --info
|
run: dotnet --info
|
||||||
|
|||||||
+4
-2
@@ -138,10 +138,12 @@ dotnet test --collect:"XPlat Code Coverage" --settings CursorLang.Tests\coverage
|
|||||||
## Непрерывная сборка
|
## Непрерывная сборка
|
||||||
|
|
||||||
Пайплайны лежат в `.gitea/workflows` и работают на Gitea Actions. Запрос
|
Пайплайны лежат в `.gitea/workflows` и работают на Gitea Actions. Запрос
|
||||||
на слияние в `master` собирается и проверяется тестами; по тегу вида `v1.2.3.0`
|
на слияние в `master` собирается и проверяется тестами; по тегу вида `v1.2.3`
|
||||||
проект собирается, проходит тесты, пакуется в MSIX и выкладывается релизом
|
проект собирается, проходит тесты, пакуется в MSIX и выкладывается релизом
|
||||||
с приложенными пакетами. Номер версии берётся только из тега — тег любого
|
с приложенными пакетами. Номер версии берётся только из тега — тег любого
|
||||||
другого вида останавливает прогон в самом начале.
|
другого вида останавливает прогон в самом начале. Версия пакета получается
|
||||||
|
`1.2.3.0`: Store принимает четыре числа и последнее оставляет себе, так что тег
|
||||||
|
на него не влияет.
|
||||||
|
|
||||||
Обоим пайплайнам нужен runner под Windows с меткой `windows-x64`, на нём —
|
Обоим пайплайнам нужен runner под Windows с меткой `windows-x64`, на нём —
|
||||||
.NET 10 SDK и git-lfs. Выгрузка исходников тянет файлы LFS: без них иконка
|
.NET 10 SDK и git-lfs. Выгрузка исходников тянет файлы LFS: без них иконка
|
||||||
|
|||||||
@@ -136,10 +136,12 @@ and the composition root in `App.xaml.cs`, which is exercised end-to-end instead
|
|||||||
## Continuous integration
|
## Continuous integration
|
||||||
|
|
||||||
The pipelines live in `.gitea/workflows` and run on Gitea Actions. A pull
|
The pipelines live in `.gitea/workflows` and run on Gitea Actions. A pull
|
||||||
request into `master` is built and tested; a tag of the form `v1.2.3.0` is built,
|
request into `master` is built and tested; a tag of the form `v1.2.3` is built,
|
||||||
tested, packed into an MSIX and published as a release with the packages
|
tested, packed into an MSIX and published as a release with the packages
|
||||||
attached. The version is taken from the tag alone — a tag shaped any other way
|
attached. The version is taken from the tag alone — a tag shaped any other way
|
||||||
stops the run right at the start.
|
stops the run right at the start. The package version ends up as `1.2.3.0`: the
|
||||||
|
Store takes four numbers and keeps the last one for itself, so the tag has no
|
||||||
|
say in it.
|
||||||
|
|
||||||
Both pipelines ask for a Windows runner labelled `windows-x64` with the .NET 10
|
Both pipelines ask for a Windows runner labelled `windows-x64` with the .NET 10
|
||||||
SDK and git-lfs on it. The checkout pulls LFS files: without them the icon is a
|
SDK and git-lfs on it. The checkout pulls LFS files: without them the icon is a
|
||||||
|
|||||||
Reference in New Issue
Block a user