Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: semantic release for prod deployment #100

Merged
merged 2 commits into from
May 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 24 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,34 @@ commands:
mv "${TMP_SRC_DIR}/"* "${ORB_DIR}/"
rm -rf "${TMP_SRC_DIR}"

semantic_release_dry_run:
description: Run semantic-release in --dry-run mode to capture info about next release version
steps:
- run:
name: Run semantic release in dry-run mode
command: |
npx -p @semantic-release/git@10.0.1 -p semantic-release@21.0.2 semantic-release --branches ${CIRCLE_BRANCH} --dry-run

check_node:
description: Check node environment
steps:
- run:
name: Check Node environment
command: |
echo node version: $(node --version)
echo npx version: $(npx --version)

jobs:
# This deploys a dev version
deploy-to-dev:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/repo
- node/install
- check_node
- semantic_release_dry_run
- install_cci_cli
- untar_orb
- run:
Expand All @@ -62,18 +83,15 @@ jobs:
prod-release:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/repo
- run:
name: See files after attach_workspace
command: |
ls -la
- node/install
- run:
name: Check Node environment
command: |
echo node version: $(node --version)
echo npx version: $(npx --version)
- check_node
- install_cci_cli
- untar_orb
- run:
Expand All @@ -85,11 +103,7 @@ jobs:
command: |
mkdir ~/.ssh
ssh-keyscan github.com > ~/.ssh/known_hosts
- run:
name: Run semantic-release in --dry-run mode to capture info about next release version
command: |
npx -p @semantic-release/git@10.0.1 -p semantic-release@21.0.2 semantic-release --branches ${CIRCLE_BRANCH} --dry-run > sem-rel-dry-run.txt
cat sem-rel-dry-run.txt
- semantic_release_dry_run
- run:
name: Update Version and Release
command: |
Expand Down