Skip to content

Commit a98af2c

Browse files
committed
CI: Creating release tag should trigger stable pipeline
1 parent 4ca7c03 commit a98af2c

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

‎azure-pipelines/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pre-release.yml: This should build from the `main` branch and publish to the Azure Pipeline feed. This will be consumed by extensions that are also doing pre-release builds. Signing is required on this build.
22

3-
stable.yml: This should build from the `release/*` branch and publish to the Azure Pipeline feed. This will be consumed by extensions when publishing stable builds. Signing is required on this build.
3+
stable.yml: This builds tags matching `release/<year>.<build>`, where `<year>` is four digits and `<build>` is numeric, and publishes to the Azure Pipeline feed. The pipeline is triggered when a matching tag is pushed to GitHub. This will be consumed by extensions when publishing stable builds. Signing is required on this build.
44

55
playground.yml: This pipeline is for engineering/testing purposes so we can do fixes and tests without affecting the pipeline feeds. This will not publish to the Azure Pipeline feed. Signing is not required on this build.

‎azure-pipelines/stable.yml‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
trigger: none
1+
trigger:
2+
branches:
3+
exclude:
4+
- "*"
5+
tags:
6+
include:
7+
- "release/*"
28
pr: none
3-
# Should only ever be manually run.
49

510
resources:
611
repositories:
@@ -45,5 +50,11 @@ extends:
4550
target: x86_64-pc-windows-msvc
4651

4752
preBuildSteps:
53+
- pwsh: |
54+
if ("$(Build.SourceBranch)" -notmatch '^refs/tags/release/\d{4}\.\d+$') {
55+
Write-Error "Stable release tag must match release/<year>.<build>, where <year> is four digits and <build> is numeric."
56+
exit 1
57+
}
58+
displayName: "Validate stable release tag"
4859
- pwsh: Rename-Item -Path "./.cargo/config.toml.disabled" -NewName "config.toml"
4960
displayName: "Enable Azure Build config for Rust"

0 commit comments

Comments
 (0)