ci: update workflows config. #640
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: CI | |
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 -v | |
- run: npm install | |
- run: npm run build | |
- run: npm install --workspaces | |
- run: npm run type-check | |
- run: npm run doc:build | |
- run: npm run bundle | |
- run: npm run bundle:min | |
- name: Generate Contributors Images | |
uses: jaywcjlove/github-action-contributors@main | |
with: | |
filter-author: (renovate\[bot\]|actions-user|renovate-bot|dependabot\[bot\]) | |
output: website/build/CONTRIBUTORS.svg | |
avatarSize: 42 | |
- run: cp -rp packages/amap/dist/* website/build | |
- run: npm publish --access public --provenance | |
name: packages/amap | |
working-directory: packages/amap | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/api-loader | |
working-directory: packages/api-loader | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/auto-complete | |
working-directory: packages/auto-complete | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/bezier-curve | |
working-directory: packages/bezier-curve | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/circle | |
working-directory: packages/circle | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/circle-marker | |
working-directory: packages/circle-marker | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/context-menu | |
working-directory: packages/context-menu | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/control-bar-control | |
working-directory: packages/control-bar-control | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/ellipse | |
working-directory: packages/ellipse | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/geolocation | |
working-directory: packages/geolocation | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/hawk-eye-control | |
working-directory: packages/hawk-eye-control | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/info-window | |
working-directory: packages/info-window | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/label-marker | |
working-directory: packages/label-marker | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/map | |
working-directory: packages/map | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/map-type-control | |
working-directory: packages/map-type-control | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/marker | |
working-directory: packages/marker | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/mass-marks | |
working-directory: packages/mass-marks | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/mouse-tool | |
working-directory: packages/mouse-tool | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/polygon | |
working-directory: packages/polygon | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/polygon-editor | |
working-directory: packages/polygon-editor | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/polyline | |
working-directory: packages/polyline | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/polyline-editor | |
working-directory: packages/polyline-editor | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/poly-editor | |
working-directory: packages/poly-editor | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/rectangle | |
working-directory: packages/rectangle | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/require-script | |
working-directory: packages/require-script | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/scale-control | |
working-directory: packages/scale-control | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/text | |
working-directory: packages/text | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/tile-layer | |
working-directory: packages/tile-layer | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/tool-bar-control | |
working-directory: packages/tool-bar-control | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/types | |
working-directory: packages/types | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/utils | |
working-directory: packages/utils | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm publish --access public --provenance | |
name: packages/weather | |
working-directory: packages/weather | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Is a tag created auto? | |
id: create_tag | |
uses: jaywcjlove/create-tag-action@main | |
with: | |
package-path: ./packages/amap/package.json | |
- name: get tag version | |
id: tag_version | |
uses: jaywcjlove/changelog-generator@main | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./website/build | |
commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }} | |
- name: Generate Changelog | |
id: changelog | |
uses: jaywcjlove/changelog-generator@main | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
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: ncipollo/release-action@v1 | |
if: steps.create_tag.outputs.successful == 'true' | |
with: | |
allowUpdates: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
name: ${{ steps.create_tag.outputs.version }} | |
tag: ${{ steps.create_tag.outputs.version }} | |
body: | | |
[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor) [![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-amap@${{steps.create_tag.outputs.versionNumber}}/file/README.md) [![npm bundle size](https://img.shields.io/bundlephobia/minzip/@uiw/react-amap)](https://bundlephobia.com/result?p=@uiw/react-amap@${{steps.create_tag.outputs.versionNumber}}) | |
```bash | |
npm i @uiw/react-amap@${{steps.create_tag.outputs.versionNumber}} | |
``` | |
${{ steps.changelog.outputs.compareurl }} | |
${{ steps.changelog.outputs.changelog }} | |
Document react-amap@${{ steps.changelog.outputs.tag }}: | |
https://raw.githack.com/uiwjs/react-amap/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html |