|
| 1 | +name: Build & Deploy |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - main |
| 6 | + |
| 7 | +# env: |
| 8 | +# SKIP_PREFLIGHT_CHECK: true |
| 9 | +jobs: |
| 10 | + windows: |
| 11 | + runs-on: windows-2019 |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v2 |
| 14 | + - uses: actions/setup-node@v2 |
| 15 | + with: |
| 16 | + node-version: 14 |
| 17 | + |
| 18 | + - name: Look Changelog |
| 19 | + uses: jaywcjlove/[email protected] |
| 20 | + with: |
| 21 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 22 | + filter-author: (小弟调调™|Renovate Bot|renovate-bot) |
| 23 | + filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' |
| 24 | + |
| 25 | + - run: npm install --unsafe-perm |
| 26 | + - run: npm run hoist |
| 27 | + - run: npm run build |
| 28 | + - run: npm run coverage |
| 29 | + - run: npm run doc |
| 30 | + |
| 31 | + build: |
| 32 | + runs-on: ubuntu-18.04 |
| 33 | + steps: |
| 34 | + - uses: actions/checkout@v2 |
| 35 | + - uses: actions/setup-node@v2 |
| 36 | + with: |
| 37 | + node-version: 14 |
| 38 | + |
| 39 | + - name: Look Changelog |
| 40 | + uses: jaywcjlove/[email protected] |
| 41 | + with: |
| 42 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 43 | + filter-author: (小弟调调™|Renovate Bot|renovate-bot) |
| 44 | + filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' |
| 45 | + |
| 46 | + - run: npm install --unsafe-perm |
| 47 | + - run: npm run hoist |
| 48 | + - run: npm run build |
| 49 | + - run: npm run coverage |
| 50 | + - run: npm run doc |
| 51 | + |
| 52 | + - name: Deploy |
| 53 | + uses: peaceiris/actions-gh-pages@v3 |
| 54 | + with: |
| 55 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 56 | + publish_dir: ./website/build |
| 57 | + |
| 58 | + - name: Is a tag created auto? |
| 59 | + id: create_tag |
| 60 | + uses: jaywcjlove/[email protected] |
| 61 | + with: |
| 62 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 63 | + package-path: ./core/package.json |
| 64 | + |
| 65 | + - name: Generate Changelog |
| 66 | + id: changelog |
| 67 | + uses: jaywcjlove/[email protected] |
| 68 | + if: steps.create_tag.outputs.successful |
| 69 | + with: |
| 70 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 71 | + head-ref: ${{ steps.create_tag.outputs.version }} |
| 72 | + filter-author: (小弟调调™|Renovate Bot|renovate-bot) |
| 73 | + filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' |
| 74 | + |
| 75 | + - name: Create Release |
| 76 | + uses: ncipollo/release-action@v1 |
| 77 | + if: steps.create_tag.outputs.successful |
| 78 | + with: |
| 79 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 80 | + name: ${{ steps.changelog.outputs.tag }} |
| 81 | + tag: ${{ steps.changelog.outputs.tag }} |
| 82 | + body: | |
| 83 | + |
| 84 | + ${{ steps.changelog.outputs.compareurl }} |
| 85 | + |
| 86 | + ${{ steps.changelog.outputs.changelog }} |
| 87 | +
|
| 88 | + # - run: git status |
| 89 | + # - run: npm install @jsdevtools/npm-publish -g |
| 90 | + # - run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./core/package.json |
| 91 | + |
0 commit comments