Skip to content

Commit fa0e7c7

Browse files
committed
feat: add release script
1 parent 3264d01 commit fa0e7c7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

scripts/release.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
# Usage: ./scripts/release.sh <major|minor|patch>
3+
set -ex
4+
5+
if [ $# -ne 1 ]; then
6+
echo "Usage: ./release.sh <major|minor|patch>"
7+
exit 1
8+
fi
9+
10+
# Fail if there are any unstaged changes left
11+
git diff --exit-code
12+
13+
pnpm lerna version $1 -y
14+
pnpm moon run :build
15+
pnpm lerna publish from-package -y
16+
NEW_VERSION=$(pnpm lerna list --json | jq -r '.[] | select(.name == "@codspeed/core") | .version')
17+
gh release create v$NEW_VERSION --title "v$NEW_VERSION" --generate-notes -d

0 commit comments

Comments
 (0)