Skip to content

Commit

Permalink
Merge branch 'dev' into macandcheese/7538-list-item-outline
Browse files Browse the repository at this point in the history
  • Loading branch information
macandcheese committed Jun 20, 2024
2 parents 00ac932 + a61c13e commit cd4de9c
Show file tree
Hide file tree
Showing 36 changed files with 2,054 additions and 1,139 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/accessibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ body:
id: packages
attributes:
label: Calcite package
description: Select the relevant [package(s)](https://github.com/Esri/calcite-design-system/tree/main/packages) related to the request.
description: Select the relevant [package(s)](https://github.com/Esri/calcite-design-system/tree/dev/packages) related to the request.
options:
- label: "@esri/calcite-components"
- label: "@esri/calcite-components-angular"
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ body:
id: packages
attributes:
label: Calcite package
description: Select the relevant [package(s)](https://github.com/Esri/calcite-design-system/tree/main/packages) related to the request.
description: Select the relevant [package(s)](https://github.com/Esri/calcite-design-system/tree/dev/packages) related to the request.
options:
- label: "@esri/calcite-components"
- label: "@esri/calcite-components-angular"
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/enhancement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ body:
id: packages
attributes:
label: Calcite package
description: Select the relevant [package(s)](https://github.com/Esri/calcite-design-system/tree/main/packages) related to the request.
description: Select the relevant [package(s)](https://github.com/Esri/calcite-design-system/tree/dev/packages) related to the request.
options:
- label: "@esri/calcite-components"
- label: "@esri/calcite-components-angular"
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/refactor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ body:
id: packages
attributes:
label: Calcite package
description: Select the relevant [package(s)](https://github.com/Esri/calcite-design-system/tree/main/packages) related to the request.
description: Select the relevant [package(s)](https://github.com/Esri/calcite-design-system/tree/dev/packages) related to the request.
options:
- label: "@esri/calcite-components"
- label: "@esri/calcite-components-angular"
Expand Down
40 changes: 16 additions & 24 deletions .github/scripts/publishPrerelease.sh
Original file line number Diff line number Diff line change
@@ -1,42 +1,36 @@
#!/usr/bin/env bash

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 +40,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
6 changes: 3 additions & 3 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Chromatic
on:
push:
branches: [main, rc, dev]
branches: [rc, dev]
pull_request:
branches: [main, rc, dev]
branches: [rc, dev]
types: [labeled, synchronize]
jobs:
run:
Expand All @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/pr-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
run: |
current_branch="$(git rev-parse --abbrev-ref HEAD)"
# diff of branch excluding md
testable_changes=$(git diff --name-only "$current_branch" $(git merge-base "$current_branch" origin/main) -- . ':(exclude)*.md*')
testable_changes=$(git diff --name-only "$current_branch" $(git merge-base "$current_branch" origin/${{ github.base_ref }}) -- . ':(exclude)*.md*')
echo "changed files: $testable_changes"
# skip if there are only md changes
if [ -z "$testable_changes" ]; then
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/schedule-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Commit and create pull request
uses: peter-evans/create-pull-request@v6
with:
base: main
base: dev
branch: ci/update-component-docs
delete-branch: true
add-paths: |
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Commit and create pull request
uses: peter-evans/create-pull-request@v6
with:
base: main
base: dev
branch: ci/update-browserslist-db
delete-branch: true
commit-message: "build: update browserslist db"
Expand Down
6 changes: 3 additions & 3 deletions documentation/monorepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ Make the following changes and submit a PR:

1. Move devDependencies to the root directory (besides local packages). You will need to regenerate the `package-lock.json` if you copy and paste from `package.json` files.
1. Move GitHub Actions, git hooks, or other CI to the root directory, if applicable. GitHub Actions should follow the the naming convention of `what-it-does_scope.yml`, e.g. `pr-tests_eslint-plugin-calcite-components.yml`
1. Add the path to the package and its current version to [`.release-please-manifest.json`](https://github.com/Esri/calcite-design-system/blob/main/.release-please-manifest.json).
1. In [`release-please-config.json`](https://github.com/Esri/calcite-design-system/blob/main/release-please-config.json) under the `packages` field, add the new package's path as well as any package-specific configurations. The only required field is the package's name, taken from the `name` field in its `package.json`.
1. If the new package needs to be linked to Calcite Component's version, add its name to the `LINKED_VERSIONS_TRACKING_PACKAGES` array in [`support/syncLinkedPackageVersions.ts`](https://github.com/Esri/calcite-design-system/blob/main/support/syncLinkedPackageVersions.ts).
1. Add the path to the package and its current version to [`.release-please-manifest.json`](https://github.com/Esri/calcite-design-system/blob/dev/.release-please-manifest.json).
1. In [`release-please-config.json`](https://github.com/Esri/calcite-design-system/blob/dev/release-please-config.json) under the `packages` field, add the new package's path as well as any package-specific configurations. The only required field is the package's name, taken from the `name` field in its `package.json`.
1. If the new package needs to be linked to Calcite Component's version, add its name to the `LINKED_VERSIONS_TRACKING_PACKAGES` array in [`support/syncLinkedPackageVersions.ts`](https://github.com/Esri/calcite-design-system/blob/dev/support/syncLinkedPackageVersions.ts).
1. Potentially rename the new package's NPM scripts so they match the pipeline names in `turbo.json` (build, test, clean, etc.). Note: having all of the NPM scripts that are specified in `turbo.json` is not required.
1. If present and when possible, the `test` NPM script should *not* build first. Turbo will make sure the `build` script runs first and will cache the results.
1. Potentially rename directories for consistency with the other packages:
Expand Down
Loading

0 comments on commit cd4de9c

Please sign in to comment.