-
-
Notifications
You must be signed in to change notification settings - Fork 6
212 lines (179 loc) · 6.56 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
name: Build & Deploy
on:
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm run build
- run: npm install
- run: npm run build:create-tsbb
- run: npm run type-check
- name: copy create-tsbb examples
working-directory: packages/create-tsbb
run: npm run copy
- name: example @example/babel-transform-ts
working-directory: examples/babel-transform-ts
run: npm run build
- name: example @example/basic
working-directory: examples/basic
run: npm run build && npm run coverage
- name: example @example/express
working-directory: examples/express
run: npm run build
- name: example @example/hapi
working-directory: examples/hapi
run: npm run build
- name: example @example/koa
working-directory: examples/koa
run: npm run build
- name: example @example/react-component
working-directory: examples/react-component
env:
CI: true
run: |
npm run build
npm run doc
npm run coverage
- name: example @example/react-component-tsx
working-directory: examples/react-component-tsx
env:
CI: true
run: |
npm run build
npm run doc
npm run coverage
cd lib/
ls -al
- name: example @example/typenexus
working-directory: examples/typenexus
run: npm run build && npm run coverage
- name: example @example/umd
working-directory: examples/umd
run: npm run build && npm run coverage
- name: example @example/vue
working-directory: examples/vue
run: npm run build
- run: npm run coverage
- run: npm install idoc@1.27.1 -g
- name: Create idoc config.
working-directory: packages/tsbb
run: |
cat > idoc.yml << EOF
site: "TSBB {{version}}"
giscus:
src: https://giscus.app/client.js
data-repo: jaywcjlove/tsbb
data-repo-id: MDEwOlJlcG9zaXRvcnkxODQ5MTg0NDY=
data-category: Q&A
data-category-id: DIC_kwDOCwWhrs4CZifu
data-mapping: pathname
data-strict: 0
data-reactions-enabled: 1
data-emit-metadata: 0
data-input-position: top
data-theme: dark
data-lang: en
data-loading: lazy
crossorigin: anonymous
async: true
EOF
- run: idoc
working-directory: packages/tsbb
- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
with:
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
output: ./packages/tsbb/dist/CONTRIBUTORS.svg
avatarSize: 36
- name: Is a tag created auto?
id: create_tag
uses: jaywcjlove/create-tag-action@main
with:
package-path: ./packages/tsbb/package.json
- name: get tag version
id: tag_version
uses: jaywcjlove/changelog-generator@main
- name: Build and Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
force_orphan: true
publish_branch: gh-pages
publish_dir: ./packages/tsbb/dist/
- name: Generate Changelog
id: changelog
uses: jaywcjlove/changelog-generator@main
if: steps.create_tag.outputs.successful
with:
head-ref: ${{ steps.create_tag.outputs.version }}
filter-author: (renovate-bot|Renovate Bot)
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
- name: Create Release
uses: jaywcjlove/create-tag-action@main
with:
package-path: ./packages/tsbb/package.json
release: true
body: |
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/tsbb@${{steps.create_tag.outputs.versionNumber}}/file/README.md)
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/jaywcjlove/tsbb/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
```bash
npm i tsbb@${{steps.create_tag.outputs.versionNumber}}
npm i create-tsbb@${{steps.create_tag.outputs.versionNumber}}
npm init tsbb@latest my-app -- --example typenexus
```
${{ steps.changelog.outputs.changelog }}
- run: npm publish --access public --provenance
name: 📦 tsbb publish to NPM
continue-on-error: true
working-directory: packages/tsbb
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: copy example to create-tsbb
working-directory: packages/create-tsbb
run: npm run copy
- run: npm publish --access public --provenance
name: 📦 create-tsbb publish to NPM
continue-on-error: true
working-directory: packages/create-tsbb
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish --access public --provenance
name: 📦 @tsbb/typescript publish to NPM
continue-on-error: true
working-directory: packages/typescript
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish --access public --provenance
name: 📦 @tsbb/jest publish to NPM
continue-on-error: true
working-directory: packages/jest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish --access public --provenance
name: 📦 @tsbb/core publish to NPM
continue-on-error: true
working-directory: packages/core
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish --access public --provenance
name: 📦 @tsbb/babel publish to NPM
continue-on-error: true
working-directory: packages/babel
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}