Skip to content

Commit e31abe3

Browse files
Generate package class in build step on publish
1 parent ca79baf commit e31abe3

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/npm-publish.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,21 @@ jobs:
1515
secrets:
1616
npm-token: ${{ secrets.NPM_TOKEN }}
1717
with:
18-
build-command: "npm run build"
18+
build-command: |
19+
git config --global user.name 'FreePhoenix888'
20+
git config --global user.email 'freephoenix888@gmail.com'
21+
22+
npx --yes --package @deep-foundation/npm-automation@10.0.18 generate-package-class
23+
git add ./src/package.ts
24+
if git diff --staged --quiet
25+
then
26+
echo "No changes to commit"
27+
else
28+
git commit -m 'docs: update ./src/package.ts'
29+
git push origin main
30+
fi
31+
32+
npm run build
1933
test-command: "echo 'Tests are temporarily disabled'"
2034
should-generate-documentation: true
2135
generate-documentation-command: |

0 commit comments

Comments
 (0)