Skip to content

Commit cc9571d

Browse files
committed
ci: the release script supports multiple origins
1 parent 8ed259b commit cc9571d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

scripts/release.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66

77
set -e
88

9-
if [ $# -ne 1 ]; then
10-
echo "Usage: $0 <version>"
11-
echo "Example: $0 v1.0.0"
9+
if [ $# -ne 2 ]; then
10+
echo "Usage: $0 <version> <origin>"
11+
echo "Example: $0 v1.0.0 origin"
1212
exit 1
1313
fi
1414

15-
VERSION=$1
15+
ORIGIN=$1
16+
VERSION=$2
17+
1618

1719
# Validate version format (should start with v)
1820
if [[ ! $VERSION =~ ^v ]]; then
@@ -32,8 +34,8 @@ fi
3234
echo "Creating tag $VERSION..."
3335
git tag "$VERSION"
3436

35-
echo "Pushing tag to origin..."
36-
git push origin "$VERSION"
37+
echo "Pushing tag to $ORIGIN..."
38+
git push "$ORIGIN" "$VERSION"
3739

3840
echo "Release $VERSION created successfully!"
3941
echo "GitHub Actions will now build and publish the release automatically."

0 commit comments

Comments
 (0)