Skip to content

Commit cbb315b

Browse files
authored
feat: update publish workflow to use package-specific files
1 parent 55b7e2b commit cbb315b

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ jobs:
1717
with:
1818
node-version: 22
1919
registry-url: 'https://registry.npmjs.org'
20+
cache: 'pnpm'
21+
22+
- run: corepack enable
23+
- run: npm i -g npm@latest
2024

2125
- uses: pnpm/action-setup@v4.0.0
2226
with:
@@ -43,15 +47,18 @@ jobs:
4347
node -v
4448
npm -v
4549
echo "registry=$(npm config get registry)"
46-
NAME=$(node -p "require('./package.json').name")
50+
NAME=$(node -p "require('./packages/text-vide/package.json').name")
4751
echo "pkg.name=${NAME}"
4852
npm view "${NAME}" name maintainers || true
49-
cat package.json
50-
53+
cat ./packages/text-vide/package.json
54+
55+
- run: |
56+
cp ./README.md ./packages/text-vide/README.md &&
57+
cd ./packages/text-vide &&
58+
npm publish
59+
5160
- name: Print npm debug log on failure
5261
if: failure()
5362
run: |
5463
LOG=$(ls -t /home/runner/.npm/_logs/*-debug-0.log 2>/dev/null | head -n1 || true)
5564
test -f "$LOG" && { echo "== NPM DEBUG LOG =="; cat "$LOG"; } || echo "no npm debug log"
56-
57-
- run: cp ./README.md ./packages/text-vide/README.md && cd ./packages/text-vide && npm publish

0 commit comments

Comments
 (0)