Skip to content
Merged
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
19 changes: 16 additions & 3 deletions .github/workflows/deploy-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,22 @@ jobs:
# For more info, see: https://github.com/Esri/calcite-design-system/pull/9011
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
# the "|| true" prevents failure if there are no changes
git add packages/calcite-components/src/components.d.ts || true
git commit -m "build: update types" || true

# The "|| true" prevents failure if there are no changes
git add packages/calcite-components/src/components.d.ts package-lock.json || true

# The release-please PR only updates when there are new deployable
# commits, e.g., fixes, features, or breaking changes. This is fine
# but it means autogenerated files can become outdated.
#
# Lerna will only publish when the working tree is clean, so changes
# to autogenerated files cause the release to fail.
#
# The workaround is to commit the files before releasing so everything
# will be up to date in the dists. The commit will be discarded once
# the container is destroyed, and then the autogenerated files will be
# updated in a subsequent PR.
git commit -m "build: update types and package-lock" || true

npm run publish:latest
env:
Expand Down
8 changes: 8 additions & 0 deletions support/release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/usr/bin/env bash
set -e

# This script is used to version and publish releases and pre-releases.
#
# @arg1 The deployment step to run, must be either "version" or "publish".
# @arg2 [optional] The pre-release tag, e.g., "next", "hotfix", or "rc".
# Omit this optional argument for a "latest" release

help() {
[ -n "$1" ] && printf "%s\n" "$@"
echo "Usage: ./release.sh <version | publish> [<pre-release-tag>]"
Expand Down Expand Up @@ -43,10 +49,12 @@ version() {
--preid "$dist_tag"
fi

# default to latest if no dist tag was provided in the second argument
npm run util:sync-linked-package-versions -- "${dist_tag:-latest}"
}

publish() {
# only add the dist-tag flag if the second argument was provided
lerna publish from-package --yes ${dist_tag:+--dist-tag $dist_tag}
}

Expand Down