You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Release automation for the workspace policy in CHANGELOG.md and CONTRIBUTING.md.
4
4
#
5
5
# Triggered by pushing a semver tag `vX.Y.Z`. Validates the tag against the
6
-
# semver policy and the changelog (INV-REL-10), runs the license/SPDX gate and
7
-
#the quality bar, packages the publishable crates, and publishes a GitHub
8
-
#Release with the changelog section as notes and the `.crate` files attached.
6
+
# semver policy and the changelog, runs the license/SPDX gate and the quality
7
+
# bar, packages the publishable crates, and publishes a GitHub Release with the
8
+
# changelog section as notes and the `.crate` files attached.
9
9
#
10
10
# Publishing to a registry is intentionally out of scope (deferred); this
11
11
# produces the packaged artifacts but does not run `cargo publish`. A manual
@@ -15,8 +15,9 @@ name: Release
15
15
on:
16
16
push:
17
17
tags:
18
-
- "v[0-9]+.[0-9]+.[0-9]+"
19
-
- "v[0-9]+.[0-9]+.[0-9]+-*"
18
+
# GitHub tag filters are globs, not regex. Match broadly here and enforce
19
+
# strict SemVer before packaging or publishing.
20
+
- "v*.*.*"
20
21
workflow_dispatch:
21
22
inputs:
22
23
version:
@@ -48,7 +49,7 @@ jobs:
48
49
- name: Tag matches semver policy
49
50
run: |
50
51
VERSION="${{ steps.version.outputs.version }}"
51
-
if ! echo "$VERSION" | grep -Eq '^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$'; then
52
+
if ! echo "$VERSION" | grep -Eq '^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)(\.(0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*))?(\+([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?$'; then
52
53
echo "::error::tag version '$VERSION' is not semver-conformant"
0 commit comments