Skip to content

Commit

Permalink
feat: add release script
Browse files Browse the repository at this point in the history
  • Loading branch information
art049 committed Jan 17, 2023
1 parent 3264d01 commit fa0e7c7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
# Usage: ./scripts/release.sh <major|minor|patch>
set -ex

if [ $# -ne 1 ]; then
echo "Usage: ./release.sh <major|minor|patch>"
exit 1
fi

# Fail if there are any unstaged changes left
git diff --exit-code

pnpm lerna version $1 -y
pnpm moon run :build
pnpm lerna publish from-package -y
NEW_VERSION=$(pnpm lerna list --json | jq -r '.[] | select(.name == "@codspeed/core") | .version')
gh release create v$NEW_VERSION --title "v$NEW_VERSION" --generate-notes -d

0 comments on commit fa0e7c7

Please sign in to comment.