There was an error while loading. Please reload this page.
1 parent d982e98 commit bc5a635Copy full SHA for bc5a635
1 file changed
.github/workflows/release.yml
@@ -33,6 +33,25 @@ jobs:
33
cache: pnpm
34
- name: Install dependencies
35
run: pnpm install --frozen-lockfile
36
+ - name: Verify all packages exist on npm
37
+ run: |
38
+ MISSING=()
39
+ for pkg in $(pnpm -r --silent exec -- node -e "
40
+ const p = require('./package.json');
41
+ if (!p.private) process.stdout.write(p.name + '\n');
42
+ "); do
43
+ if ! npm view "$pkg" > /dev/null 2>&1; then
44
+ MISSING+=("$pkg")
45
+ fi
46
+ done
47
+ if [ ${#MISSING[@]} -gt 0 ]; then
48
+ echo "::error::The following packages are not yet published on npm:"
49
+ for pkg in "${MISSING[@]}"; do
50
+ echo "::error:: - $pkg"
51
52
+ exit 1
53
54
+ echo "All packages exist on npm."
55
- name: Create Release Pull Request or Publish to npm
56
id: changesets
57
uses: changesets/action@v1
0 commit comments