released v4.0.0-beta.4 #233
This file contains hidden or 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 | |
| # tags: | |
| # - v* | |
| env: | |
| SKIP_PREFLIGHT_CHECK: true | |
| 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' | |
| - name: Look Changelog | |
| uses: jaywcjlove/changelog-generator@main | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| filter-author: (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot) | |
| filter: (^[\s]+?[R|r]elease)|(^[R|r]elease) | |
| - run: npm install | |
| - run: npm run build | |
| - run: npm run test | |
| - run: cp -rp dist doc | |
| - name: Generate Contributors Images | |
| uses: jaywcjlove/github-action-contributors@main | |
| with: | |
| filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\]) | |
| output: doc/CONTRIBUTORS.svg | |
| avatarSize: 42 | |
| - name: Create Tag | |
| id: create_tag | |
| uses: jaywcjlove/create-tag-action@main | |
| with: | |
| package-path: ./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: | |
| commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }} | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./doc | |
| - name: Generate Changelog | |
| id: changelog | |
| uses: jaywcjlove/changelog-generator@main | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| filter-author: (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot) | |
| filter: (^[\s]+?[R|r]elease)|(^[R|r]elease) | |
| - run: | | |
| echo "tag: ${{ steps.changelog.outputs.tag }}" | |
| echo "version: ${{ steps.changelog.outputs.version }}" | |
| echo "ref: ${{ github.ref }}" | |
| - name: Create Release | |
| uses: ncipollo/release-action@v1 | |
| if: steps.create_tag.outputs.successful | |
| with: | |
| allowUpdates: true | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| name: ${{ steps.create_tag.outputs.version }} | |
| tag: ${{ steps.create_tag.outputs.version }} | |
| body: | | |
| [](https://jaywcjlove.github.io/#/sponsor) [](https://uiwjs.github.io/npm-unpkg/#/pkg/hotkeys-js@${{steps.changelog.outputs.version}}/file/README.md) [](https://bundlephobia.com/result?p=hotkeys-js@${{steps.changelog.outputs.version}}) [](https://www.npmjs.com/package/hotkeys-js) | |
| Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/jaywcjlove/hotkeys/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html | |
| Comparing Changes: ${{ steps.changelog.outputs.compareurl }} | |
| ```bash | |
| npm i hotkeys-js@${{steps.changelog.outputs.version}} | |
| ``` | |
| ${{ steps.changelog.outputs.changelog }} | |
| - name: package.json info | |
| uses: jaywcjlove/github-action-package@main | |
| with: | |
| unset: browserslist,lint-staged,devDependencies,jest,scripts | |
| # - run: npm install @jsdevtools/npm-publish -g | |
| # - run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json | |
| - run: npm publish --access public --provenance | |
| name: 📦 hotkeys-js to NPM | |
| continue-on-error: true | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |