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

Add script to pack/store packages on develop and next #7287

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
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
18 changes: 18 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,17 @@ jobs:
- store_artifacts: { path: packages/demo-app/dist }
- run: ./scripts/submit-preview-comment.sh

store-packages:
docker: *docker-node-image
steps:
- checkout
- restore_cache: *restore-node-modules-cache
- attach_workspace: { at: "." }
- run: sudo corepack enable
- run: mkdir ./artifacts
- run: ./scripts/pack-npm
- store_artifacts: { path: ./artifacts }

deploy-npm:
docker: *docker-node-image
steps:
Expand Down Expand Up @@ -234,6 +245,13 @@ workflows:
requires: [compile]
- deploy-preview:
requires: [dist]
- store-packages:
requires: [dist]
filters:
branches:
only:
- develop
- next
- deploy-npm:
requires: [dist, lint, test-node-libs, test-react-18, test-iso-react-18]
filters:
Expand Down
21 changes: 21 additions & 0 deletions scripts/pack-npm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -e
set -o pipefail

packages=("colors" "core" "datetime" "datetime2" "icons" "select" "table")

mkdir -p artifacts

for package in ${packages[@]}; do
path="packages/$package"
pushd $path

version=$(jq -r '.version' package.json)
filename="../../artifacts/blueprintjs-$(basename "$path")-$version.tgz"

echo "Attempting to pack package at path '$path'"
yarn pack --filename $filename

popd
done