|
1 |
| -name: Build & Deploy |
| 1 | +name: Website & Publishing |
2 | 2 | on:
|
3 | 3 | push:
|
4 | 4 | branches:
|
|
8 | 8 |
|
9 | 9 | jobs:
|
10 | 10 | build-deploy:
|
11 |
| - runs-on: ubuntu-18.04 |
| 11 | + runs-on: ubuntu-latest |
12 | 12 | steps:
|
13 |
| - - uses: actions/checkout@v3 |
14 |
| - - uses: actions/setup-node@v3 |
15 |
| - with: |
16 |
| - node-version: 16 |
| 13 | + - uses: actions/checkout@v3 |
| 14 | + - uses: actions/setup-node@v3 |
| 15 | + with: |
| 16 | + node-version: 16 |
| 17 | + registry-url: 'https://registry.npmjs.org' |
17 | 18 |
|
18 |
| - - run: npm install |
19 |
| - - run: npm run build |
20 |
| - - run: npm run coverage |
21 | 19 |
|
22 |
| - - run: npm i coverage-badges-cli markdown-to-html-cli -g |
23 |
| - - run: coverage-badges |
24 |
| - - run: markdown-to-html --output coverage/index.html |
| 20 | + - run: npm install |
| 21 | + - run: npm run build |
| 22 | + - run: npm run coverage |
25 | 23 |
|
26 |
| - - name: Deploy |
27 |
| - uses: peaceiris/actions-gh-pages@v3 |
28 |
| - with: |
29 |
| - github_token: ${{ secrets.GITHUB_TOKEN }} |
30 |
| - publish_dir: ./coverage |
| 24 | + - run: npm i coverage-badges-cli markdown-to-html-cli -g |
| 25 | + - run: coverage-badges |
| 26 | + - run: markdown-to-html --output coverage/index.html |
31 | 27 |
|
32 |
| - - run: npm install @jsdevtools/npm-publish -g |
33 |
| - - run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json |
| 28 | + - name: Deploy |
| 29 | + uses: peaceiris/actions-gh-pages@v3 |
| 30 | + with: |
| 31 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 32 | + publish_dir: ./coverage |
34 | 33 |
|
35 |
| - - name: Create Tag |
36 |
| - id: create_tag |
37 |
| - uses: jaywcjlove/create-tag-action@v1.3.8 |
38 |
| - with: |
39 |
| - package-path: ./package.json |
| 34 | + - run: npm install @jsdevtools/npm-publish -g |
| 35 | + - run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json |
40 | 36 |
|
41 |
| - - name: Generate Changelog |
42 |
| - id: changelog |
43 |
| - uses: jaywcjlove/changelog-generator@v1.5.7 |
44 |
| - with: |
45 |
| - token: ${{ secrets.GITHUB_TOKEN }} |
46 |
| - head-ref: ${{steps.create_tag.outputs.version}} |
47 |
| - filter-author: (小弟调调™|dependabot|renovate\\[bot\\]|dependabot\\[bot\\]|Renovate Bot) |
48 |
| - filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' |
| 37 | + - name: Create Tag |
| 38 | + id: create_tag |
| 39 | + uses: jaywcjlove/create-tag-action@main |
| 40 | + with: |
| 41 | + package-path: ./package.json |
49 | 42 |
|
50 |
| - - name: Create Release |
51 |
| - uses: ncipollo/release-action@v1 |
52 |
| - if: steps.create_tag.outputs.successful |
53 |
| - with: |
54 |
| - name: ${{ steps.create_tag.outputs.version }} |
55 |
| - tag: ${{ steps.create_tag.outputs.version }} |
56 |
| - token: ${{ secrets.GITHUB_TOKEN }} |
57 |
| - body: | |
58 |
| - [](https://uiwjs.github.io/npm-unpkg/#/pkg/bannerjs@${{steps.create_tag.outputs.versionNumbe}}/file/README.md) |
| 43 | + - name: Generate Changelog |
| 44 | + id: changelog |
| 45 | + uses: jaywcjlove/changelog-generator@main |
| 46 | + with: |
| 47 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 48 | + head-ref: ${{steps.create_tag.outputs.version}} |
| 49 | + filter-author: (小弟调调™|dependabot|renovate\\[bot\\]|dependabot\\[bot\\]|Renovate Bot) |
| 50 | + filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' |
59 | 51 |
|
60 |
| - ```bash |
61 |
| - npm i bannerjs@${{steps.create_tag.outputs.versionNumber}} |
62 |
| - ``` |
| 52 | + - name: Create Release |
| 53 | + uses: ncipollo/release-action@v1 |
| 54 | + if: steps.create_tag.outputs.successful |
| 55 | + with: |
| 56 | + name: ${{ steps.create_tag.outputs.version }} |
| 57 | + tag: ${{ steps.create_tag.outputs.version }} |
| 58 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 59 | + body: | |
| 60 | + [](https://uiwjs.github.io/npm-unpkg/#/pkg/bannerjs@${{steps.create_tag.outputs.versionNumbe}}/file/README.md) |
63 | 61 |
|
64 |
| - ${{ steps.changelog.outputs.compareurl }} |
| 62 | + ```bash |
| 63 | + npm i bannerjs@${{steps.create_tag.outputs.versionNumber}} |
| 64 | + ``` |
65 | 65 |
|
66 |
| - ${{ steps.changelog.outputs.changelog }} |
| 66 | + ${{ steps.changelog.outputs.compareurl }} |
| 67 | +
|
| 68 | + ${{ steps.changelog.outputs.changelog }} |
0 commit comments