released v4.3.0 #104
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
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 -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@v4 | |
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 }} |