diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81799aea53..1182bdd024 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,28 +7,27 @@ jobs: build-deploy: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@master - - - name: Setup Node - uses: actions/setup-node@v1 + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 with: - node-version: '10.x' + node-version: 14 - name: Generate Changelog id: changelog - uses: jaywcjlove/changelog-generator@v1.3.9 + uses: jaywcjlove/changelog-generator@v1.4.1 with: token: ${{ secrets.GITHUB_TOKEN }} + head-ref: ${{steps.create_tag.outputs.version}} filter-author: (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot) - filter: (^[\s]+?[R|r]elease)|(^[R|r]elease) + filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' - run: npm install - run: npm run build - run: npm run dash - - name: Build and Deploy - uses: peaceiris/actions-gh-pages@v2.5.0 - env: - ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} - PUBLISH_BRANCH: gh-pages - PUBLISH_DIR: ./.deploy + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./.deploy + \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dce69169fa..262aa1ec77 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,11 +9,12 @@ jobs: test: runs-on: ubuntu-18.04 steps: - # To use this repository's private action, you must check out the repository - - name: Checkout - uses: actions/checkout@v2 + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 - - name: Generate changelog + - name: Generate Changelog id: changelog uses: jaywcjlove/changelog-generator@v1.3.9 with: @@ -22,15 +23,31 @@ jobs: filter: (^[\s]+?[R|r]elease)|(^[R|r]elease) - name: Create Release - id: create_release - uses: actions/create-release@latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: ncipollo/release-action@v1 with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} + token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ steps.changelog.outputs.tag }} + tag: ${{ steps.changelog.outputs.tag }} body: | + [![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/linux-command@${{steps.changelog.outputs.versionNumber}}/file/README.md) [![npm bundle size](https://img.shields.io/bundlephobia/minzip/linux-command)](https://bundlephobia.com/result?p=linux-command@${{steps.changelog.outputs.versionNumber}}) + + ```bash + npm i linux-command@${{steps.changelog.outputs.version}} + ``` + ${{ steps.changelog.outputs.compareurl }} ${{ steps.changelog.outputs.changelog }} - draft: false - prerelease: false + + - run: npm install + - run: npm run build + + - run: npm install @jsdevtools/npm-publish -g + - run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json + + - run: npm run dash + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./.deploy