Skip to content

Commit

Permalink
Merge branch 'dev' into benelan/generate-custom-elements-manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
benelan authored Jun 25, 2024
2 parents 2ac53bb + dfa32de commit fd42a77
Show file tree
Hide file tree
Showing 106 changed files with 3,887 additions and 2,114 deletions.
41 changes: 17 additions & 24 deletions .github/scripts/publishPrerelease.sh
Original file line number Diff line number Diff line change
@@ -1,42 +1,37 @@
#!/usr/bin/env bash
set -o errexit

if [ "$BRANCH" = "dev" ]; then
if [ "$NEXT_RELEASE_ENABLED" != "true" ]; then
echo "Next release is disabled"
exit 0
fi

if ! npm run util:is-next-deployable; then
echo "No deployable changes in dev"
exit 0
fi
if [ "$BRANCH" = "dev" ] && [ "$NEXT_RELEASE_ENABLED" != "true" ]; then
echo "Next release is disabled"
exit 0
fi

npm install

if [ "$BRANCH" = "dev" ] && ! npm run util:is-next-deployable; then
echo "No deployable changes on dev"
exit 0
fi

git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"

# version the packages with lerna before building to ensure the version in
# Calcite components' source code preamble is correct for deployment
if [ "$BRANCH" = "dev" ]; then
npm run version:next
elif [ "$BRANCH" = "main" ]; then
npm run version:hotfix
elif [ "$BRANCH" = "rc" ]; then
npm run version:rc
else
echo "Prereleases are only deployable from the 'dev' and 'rc' branches."
exit 1
fi

npm run build
npm test

git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"

# make sure the committed, autogenerated files are up to date before releasing.
# The "|| true" prevents failure if there are no changes.
git add packages/calcite-components/src/components.d.ts package-lock.json || true
git commit -m "build: update types and package-lock" || true

# try deploying storybook, but still release next if it fails with "|| true"
if [ "$BRANCH" = "main" ]; then
if [ "$BRANCH" = "dev" ]; then
{ npm run --workspace=@esri/calcite-components build-storybook &&
npx --workspace=@esri/calcite-components storybook-to-ghpages \
--host-token-env-variable=GH_TOKEN_FOR_STORYBOOK \
Expand All @@ -46,10 +41,8 @@ if [ "$BRANCH" = "main" ]; then
git reset --hard
fi

if [ "$BRANCH" = "main" ]; then
if [ "$BRANCH" = "dev" ]; then
npm run publish:next
elif [ "$BRANCH" = "dev" ]; then
npm run publish:hotfix
elif [ "$BRANCH" = "rc" ]; then
npm run publish:rc
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- run: npm install
- run: npm --workspace="packages/calcite-design-tokens" run build
- name: Publish to Chromatic
uses: chromaui/action@v1
uses: chromaui/action@v11
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
zip: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
# `next` versions are automatically released when deployabled commits are pushed to dev
push:
branches: [dev]
# `hotfix` and `rc` versions must be manually released:
# `rc` versions must be manually released:
# https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow
workflow_dispatch:
jobs:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ $RECYCLE.BIN/
.env
.idea/
.sass-cache/
.stencil/
.turbo
.versions/
Dockerfile
Expand Down
Loading

0 comments on commit fd42a77

Please sign in to comment.