Skip to content

Commit 1607a37

Browse files
Update automation
1 parent 4d05a3d commit 1607a37

File tree

5 files changed

+208
-105
lines changed

5 files changed

+208
-105
lines changed

.github/workflows/npm-publish.yml

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,42 +11,18 @@ on:
1111

1212
jobs:
1313
main:
14-
uses: deep-foundation/workflows/.github/workflows/npm-publish.yml@npm-publish-1.1.0
14+
uses: deep-foundation/workflows/.github/workflows/npm-publish.yml@npm-publish-3.0.0
1515
secrets:
1616
npm-token: ${{ secrets.NPM_TOKEN }}
1717
with:
1818
build-command: |
19-
git config --global user.name 'FreePhoenix888'
20-
git config --global user.email '[email protected]'
21-
22-
npx --yes --package @deep-foundation/[email protected] 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 'Generate new package class'
29-
git push origin main
30-
fi
31-
32-
npm run build
19+
git config --global user.email "[email protected]"
20+
git config --global user.name "freephoenix888"
21+
npm run library:build:dirty
3322
test-command: "echo 'Tests are temporarily disabled'"
3423
should-generate-documentation: true
3524
generate-documentation-command: |
36-
table_of_contents=$(npx [email protected] README.md)
37-
pattern="(<!-- TABLE_OF_CONTENTS_START -->)[\\S\\s]*(<!-- TABLE_OF_CONTENTS_END -->)"
38-
replacement=$'$1\n'"${table_of_contents}"$'\n$2'
39-
npx replace "$pattern" "$replacement" README.md
40-
41-
git add README.md
42-
if git diff --staged --quiet
43-
then
44-
echo "No changes to commit"
45-
else
46-
git config --global user.name 'FreePhoenix888'
47-
git config --global user.email '[email protected]'
48-
git commit -m 'docs: update README.md'
49-
git push origin main
50-
fi
25+
git config --global user.email "[email protected]"
26+
git config --global user.name "freephoenix888"
27+
npm run documentation:generate
5128
52-
npx [email protected] ./src/main.ts
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import {generateDocumentation} from '@deep-foundation/npm-automation'
2+
3+
main();
4+
5+
async function main() {
6+
await generateDocumentation({
7+
generateCliAppsHelpInReadmeOptions: null,
8+
generateUsageWaysOfNpmCliAppsInMarkdownFormatOptions: null,
9+
})
10+
};

automation/library/build.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import {buildTypescriptLibrary} from '@deep-foundation/npm-automation'
2+
3+
main();
4+
5+
async function main() {
6+
await buildTypescriptLibrary({})
7+
}

package-lock.json

Lines changed: 178 additions & 70 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)