Skip to content

Commit

Permalink
chore: add release script
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jan 15, 2024
1 parent 320ef1f commit cffcd07
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"dev:preview": "node ./playground/.output/server/index.mjs",
"dev:prepare": "pnpm build:stub && nuxi prepare playground",
"lint": "eslint --ext .vue,.ts,.js,.mjs .",
"release": "./scripts/release.sh && pnpm dev:prepare",
"test:fixtures": "pnpm dev:prepare && JITI_ESM_RESOLVE=1 vitest run --dir test",
"test:fixtures:dev": "TEST_ENV=dev pnpm test:fixtures",
"test:fixtures:webpack": "TEST_BUILDER=webpack pnpm test:fixtures",
Expand Down
20 changes: 20 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -e

# Restore all git changes
git restore -s@ -SW -- packages

# Build all once to ensure things are nice
pnpm build

# Release packages
for PKG in packages/* ; do
pushd $PKG
TAG="latest"
echo "⚡ Publishing $PKG with tag $TAG"
cp ../../LICENSE .
cp ../../README.md .
pnpm publish --access public --no-git-checks --tag $TAG
popd > /dev/null
done

0 comments on commit cffcd07

Please sign in to comment.