From 0e7511b379927975f850253bc5683ee0addfbbe5 Mon Sep 17 00:00:00 2001 From: GerkinDev Date: Thu, 7 Oct 2021 22:51:37 +0200 Subject: [PATCH] ci(circleci): store release type to avoid errors after pipeline commits --- .circleci/config.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9b8f8763..709a7a64 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -136,8 +136,13 @@ jobs: --url https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID/cancel \ --header "Circle-Token: ${CIRCLE_TOKEN}" else - echo "Should release $(bash ./scripts/ci/release-type.sh)" + bash ./scripts/ci/release-type.sh > RELEASE_TYPE + echo "Should release $(cat ./RELEASE_TYPE)" fi + - persist_to_workspace: + root: . + paths: + - RELEASE_TYPE - run: name: Check files command: npm publish --dry-run @@ -154,7 +159,7 @@ jobs: - run: name: Run standard-version command: | - release_type="$(bash ./scripts/ci/release-type.sh)" + release_type="$(cat ./RELEASE_TYPE)" if [ -z ${release_type} ]; then npm run release:do -- --no-verify else @@ -220,7 +225,7 @@ jobs: - run: name: Publish package command: | - release_type="$(bash ./scripts/ci/release-type.sh)" + release_type="$(cat ./RELEASE_TYPE)" if [ -z ${release_type} ]; then npm publish else