diff --git a/.circleci/config.yml b/.circleci/config.yml index 5ebd421589..37f2b04e07 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -134,6 +134,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 @@ -167,7 +218,7 @@ workflows: branches: only: - main - # - beta + - beta - BUILD: requires: - CHECKOUT diff --git a/publish-version.mjs b/publish-version.mjs index 2521cb022b..85b3b08db5 100644 --- a/publish-version.mjs +++ b/publish-version.mjs @@ -129,8 +129,6 @@ async function run() { '--message', `chore(version): Update package versions to ${nextVersion} [skip ci]`, '--conventional-commits', - '--create-release', - 'github', '--no-push', ]);