diff --git a/.circleci/config.yml b/.circleci/config.yml index 00424b1354a..40c21d26bc0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -178,6 +178,57 @@ jobs: name: publish package versions command: | bun ./publish-version.mjs + - run: + name: create GitHub release from version tag + command: | + if [ -z "$GH_TOKEN" ]; then + echo "GH_TOKEN is required to create GitHub releases." + exit 1 + fi + + if [ ! -f ./version.txt ]; then + echo "version.txt was not found; cannot create release." + exit 1 + fi + + VERSION=$(tr -d '\r\n' < ./version.txt) + TAG="v${VERSION}" + IS_PRERELEASE=false + + if [ "$CIRCLE_BRANCH" = "beta" ]; then + IS_PRERELEASE=true + fi + + RELEASE_PAYLOAD=$(cat \< ~/repo/.npmrc diff --git a/publish-version.mjs b/publish-version.mjs index b9755b010f2..3d9ba217d52 100644 --- a/publish-version.mjs +++ b/publish-version.mjs @@ -78,8 +78,6 @@ async function run() { '--message', `chore(version): Update package versions to ${nextVersion} [skip ci]`, '--conventional-commits', - '--create-release', - 'github', '--no-push', ]);