Skip to content
This repository was archived by the owner on Feb 10, 2026. It is now read-only.

Commit 8db0572

Browse files
authored
Add release automation (#521)
## Description Add a script called in the release automation workflow. Example PR: https://github.com/fishjam-cloud/release-test-mobile-client-sdk/pull/3 ## Motivation and Context Speed up the release.
1 parent c342fd6 commit 8db0572

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodejs 18

release-automation/bump-version.sh

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# NOTE:
5+
# This script prepares a release by creating a `release-<version>` branch
6+
# and updating package versions (root `package.json` and the
7+
# `@fishjam-cloud/react-native-client` workspace). It does NOT commit or
8+
# push the changes to the remote repository. Committing and pushing (and any
9+
# additional CI/workflow steps) are expected to be handled by the caller or
10+
# the surrounding release automation workflow that invokes this script.
11+
# This will be called by the release workflow in @fishjam-cloud/release-automation.
12+
#
13+
# Usage: ./bump-version.sh <version>
14+
15+
VERSION="$1"
16+
17+
if [ -z "$VERSION" ]; then
18+
echo "Usage: $0 <version>"
19+
exit 1
20+
fi
21+
22+
# Validate semantic version format (X.Y.Z)
23+
if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
24+
echo "Error: Version must be in format X.Y.Z"
25+
exit 1
26+
fi
27+
28+
# Create release branch
29+
BRANCH_NAME="release-$VERSION"
30+
git checkout -b "$BRANCH_NAME"
31+
32+
# Update root package.json
33+
if [ -f package.json ]; then
34+
echo "Enabling corepack..."
35+
corepack enable
36+
corepack yarn install
37+
corepack yarn version "$VERSION"
38+
echo "Updated root package.json to $VERSION"
39+
else
40+
echo "Root package.json not found!"
41+
exit 1
42+
fi
43+
44+
# Update react-native-client package
45+
corepack yarn workspace @fishjam-cloud/react-native-client version "$VERSION"
46+
echo "Updated react-native-client to $VERSION"
47+
48+
echo "✅ Version bump complete for $VERSION"
49+
echo "BRANCH_NAME:$BRANCH_NAME"

0 commit comments

Comments
 (0)