Automate release process via Changesets (#3915)

Co-authored-by: Francisco <fg@frang.io>
This commit is contained in:
Ernesto García
2023-01-18 17:34:32 -06:00
committed by GitHub
parent f81e5f51c1
commit 0c89a8b771
37 changed files with 4123 additions and 651 deletions

View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail
# Intentionally escape $ to avoid interpolation and writing the token to disk
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
# Actual publish
npm publish "$TARBALL" --tag "$TAG"
if [ "$TAG" = "tmp" ]; then
# Remove tmp tag
PACKAGE_JSON_NAME="$(tar xfO "$TARBALL" package/package.json | jq -r .name)"
npm dist-tag rm "$PACKAGE_JSON_NAME" "$TAG"
fi