Skip to content

Commit a32341d

Browse files
committed
Add support for alpha, beta and RC semver tags
- Extend release workflow to handle prerelease tags (alpha, beta, rc) - Maintain support for standard semver tags - This enables proper CI/CD for all release stages
1 parent 1acb99e commit a32341d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ name: Release
33
on:
44
push:
55
tags:
6-
- "v*"
6+
- "[0-9]+.[0-9]+.[0-9]+*"
7+
- "[0-9]+.[0-9]+.[0-9]+-alpha*"
8+
- "[0-9]+.[0-9]+.[0-9]+-beta*"
9+
- "[0-9]+.[0-9]+.[0-9]+-rc*"
710
workflow_dispatch:
811

912
env:

php/composer-plugin/src/BinaryInstaller.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ private function normaliseTag(string $raw): string
118118
throw new RuntimeException('Empty PhpRabbitRs version tag.');
119119
}
120120

121-
return $raw[0] === 'v' ? $raw : 'v' . $raw;
121+
// For semver tags without 'v' prefix, we don't add 'v'
122+
return $raw;
122123
}
123124

124125
private function resolveDownloadUrl(string $tag, string $artifact): string

0 commit comments

Comments
 (0)