File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 11# Automated release via Changesets.
22#
3- # On push to main :
3+ # On tagging :
44# - If there are unreleased changesets, opens/updates a release version
55# PR that bumps versions and updates changelogs.
66# - If there are no unreleased changesets, builds, tests, and publishes
@@ -12,7 +12,8 @@ name: Release
1212
1313on :
1414 push :
15- branches : [main]
15+ tags :
16+ - ' v*'
1617
1718concurrency : ${{ github.workflow }}-${{ github.ref }}
1819
@@ -101,6 +102,18 @@ jobs:
101102 version="$(node tools/release-version.cjs)"
102103 echo "version=$version" >> "$GITHUB_OUTPUT"
103104
105+ - name : Validate tag matches release version
106+ env :
107+ TAG_VERSION : ${{ github.ref_name }}
108+ RELEASE_VERSION : ${{ steps.version.outputs.version }}
109+ run : |
110+ tag_version="${TAG_VERSION#v}"
111+
112+ if [ "$tag_version" != "$RELEASE_VERSION" ]; then
113+ echo "Tag version $tag_version does not match release version $RELEASE_VERSION." >&2
114+ exit 1
115+ fi
116+
104117 - name : Build all packages
105118 run : make
106119
You can’t perform that action at this time.
0 commit comments