Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
branches:
- main
- v1.x
- v1
types:
- opened
- synchronize
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
- name: Check branch is releasable
run: |
BRANCH="${{ github.ref_name }}"
if [ "$BRANCH" != "main" ] && [ "$BRANCH" != "v1.x" ] && ! echo "$BRANCH" | grep -qE '^release/v[0-9]+\.[0-9]+$'; then
echo "::error::Releases can only be created from 'main', 'v1.x' or 'release/vX.Y' branches. Current branch: $BRANCH"
if [ "$BRANCH" != "main" ] && [ "$BRANCH" != "v1" ] && ! echo "$BRANCH" | grep -qE '^release/v[0-9]+\.[0-9]+$'; then
echo "::error::Releases can only be created from 'main', 'v1' or 'release/vX.Y' branches. Current branch: $BRANCH"
exit 1
fi
echo "Branch '$BRANCH' is valid for release."
Expand Down Expand Up @@ -199,7 +199,7 @@ jobs:
echo 'tags<<TAGS_EOF'
echo "${IMAGE}:${VERSION}"
# Push ":latest" only from `main`. ":latest" points to the
# production image. A release from `v1.x` must not move it to the
# production image. A release from `v1` must not move it to the
# next-major line.
if [ "$BRANCH" = "main" ]; then
echo "${IMAGE}:latest"
Expand Down
12 changes: 6 additions & 6 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// Release branches, in ascending version order. semantic-release derives the
// version range each branch may publish from the tags on the branches after it:
//
// - main The 0.x production line. When v1.x holds a v1.0.0 tag, main is
// - main The 0.x production line. When v1 holds a v1.0.0 tag, main is
// clamped to ">=0.x <1.0.0" and accepts only patch and minor. A
// breaking change merged here then fails the release with
// EINVALIDNEXTVERSION. That failure is the guardrail, not a defect:
// the commit belongs on v1.x.
// - v1.x The next-major development line. It publishes on its own "v1.x"
// the commit belongs on v1.
// - v1 The next-major development line. It publishes on its own "v1"
// channel, so its GitHub releases are marked pre-release and never
// take the "Latest" badge away from main.
//
// You might ask, why are we not just using release/v1.0.x instead? The reason
// is because we might want multiple feature versions of v1.x deployed in
// is because we might want multiple feature versions of v1 deployed in
// various environments simultaneously, and using release/v1.0.x would tie us to a
// single patch line, which is less flexible.
//
Expand All @@ -21,8 +21,8 @@ const maintenanceMatch = branch.match(/^release\/v(\d+)\.(\d+)$/)
const branches = [
'main',
{
name: 'v1.x',
channel: 'v1.x'
name: 'v1',
channel: 'v1'
}
]
if (maintenanceMatch) {
Expand Down
Loading