Skip to content

Commit

Permalink
ci(circleci): store release type to avoid errors after pipeline commits
Browse files Browse the repository at this point in the history
  • Loading branch information
GerkinDev committed Oct 7, 2021
1 parent d4d9d27 commit 0e7511b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0e7511b

Please sign in to comment.