|
9 | 9 |
|
10 | 10 | jobs: |
11 | 11 | build-deploy: |
12 | | - runs-on: ubuntu-18.04 |
| 12 | + runs-on: ubuntu-latest |
13 | 13 | steps: |
14 | | - - uses: actions/checkout@v2 |
15 | | - - uses: actions/setup-node@v2 |
16 | | - with: |
17 | | - node-version: 14 |
18 | | - |
19 | | - - run: npm install |
20 | | - - run: npm run build |
21 | | - - run: npm run coverage |
22 | | - - run: npm run doc |
23 | | - - run: npm run map |
24 | | - |
25 | | - - uses: jaywcjlove/coverage-badges-cli@main |
26 | | - - run: cp -rp coverage build |
27 | | - |
28 | | - - name: Generate Contributors Images |
29 | | - uses: jaywcjlove/github-action-contributors@main |
30 | | - with: |
31 | | - filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\]) |
32 | | - output: build/CONTRIBUTORS.svg |
33 | | - avatarSize: 42 |
34 | | - |
35 | | - # - run: npm install @jsdevtools/npm-publish -g |
36 | | - # - run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json |
37 | | - |
38 | | - - name: 📦 📦 @uiw/react-code-preview 📦 📦 |
39 | | - uses: JS-DevTools/npm-publish@v1 |
40 | | - with: |
41 | | - token: ${{ secrets.NPM_TOKEN }} |
42 | | - package: package.json |
43 | | - |
44 | | - - name: Create Tag |
45 | | - id: create_tag |
46 | | - uses: jaywcjlove/create-tag-action@v1.3.6 |
47 | | - with: |
48 | | - package-path: ./package.json |
49 | | - |
50 | | - - name: get tag version |
51 | | - id: tag_version |
52 | | - uses: jaywcjlove/changelog-generator@v1.5.0 |
53 | | - |
54 | | - - name: Deploy |
55 | | - uses: peaceiris/actions-gh-pages@v3 |
56 | | - with: |
57 | | - commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }} |
58 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
59 | | - publish_dir: ./build |
60 | | - user_name: 'github-actions[bot]' |
61 | | - user_email: 'github-actions[bot]@users.noreply.github.com' |
62 | | - |
63 | | - - name: Generate Changelog |
64 | | - id: changelog |
65 | | - uses: jaywcjlove/changelog-generator@v1.5.0 |
66 | | - with: |
67 | | - token: ${{ secrets.GITHUB_TOKEN }} |
68 | | - head-ref: ${{steps.create_tag.outputs.version}} |
69 | | - filter-author: (renovate-bot|Renovate Bot) |
70 | | - filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' |
71 | | - |
72 | | - - name: Create Release |
73 | | - uses: ncipollo/release-action@v1 |
74 | | - if: steps.create_tag.outputs.successful |
75 | | - with: |
76 | | - token: ${{ secrets.GITHUB_TOKEN }} |
77 | | - name: ${{ steps.create_tag.outputs.version }} |
78 | | - tag: ${{ steps.create_tag.outputs.version }} |
79 | | - body: | |
80 | | - [](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-code-preview@${{steps.create_tag.outputs.versionNumber}}/file/README.md) |
81 | | -
|
82 | | - Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/uiwjs/react-code-preview/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html |
83 | | - Comparing Changes: ${{ steps.changelog.outputs.compareurl }} |
84 | | -
|
85 | | - ```bash |
86 | | - npm i @uiw/react-code-preview@${{steps.create_tag.outputs.versionNumber}} |
87 | | - ``` |
88 | | -
|
89 | | - ${{ steps.changelog.outputs.changelog }} |
| 14 | + - uses: actions/checkout@v4 |
| 15 | + - uses: actions/setup-node@v4 |
| 16 | + with: |
| 17 | + node-version: 20 |
| 18 | + registry-url: 'https://registry.npmjs.org' |
| 19 | + |
| 20 | + - run: npm install |
| 21 | + - run: npm run build |
| 22 | + - run: npm run coverage |
| 23 | + - run: npm run doc |
| 24 | + - run: npm run map |
| 25 | + |
| 26 | + - uses: jaywcjlove/coverage-badges-cli@main |
| 27 | + - run: cp -rp coverage build |
| 28 | + |
| 29 | + - name: Generate Contributors Images |
| 30 | + uses: jaywcjlove/github-action-contributors@main |
| 31 | + with: |
| 32 | + filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\]) |
| 33 | + output: build/CONTRIBUTORS.svg |
| 34 | + avatarSize: 42 |
| 35 | + |
| 36 | + # - run: npm install @jsdevtools/npm-publish -g |
| 37 | + # - run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json |
| 38 | + |
| 39 | + - run: npm publish --access public --provenance |
| 40 | + name: 📦 @uiw/react-json-view publish to NPM |
| 41 | + continue-on-error: true |
| 42 | + env: |
| 43 | + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 44 | + |
| 45 | + # - name: 📦 📦 @uiw/react-code-preview 📦 📦 |
| 46 | + # uses: JS-DevTools/npm-publish@v1 |
| 47 | + # with: |
| 48 | + # token: ${{ secrets.NPM_TOKEN }} |
| 49 | + # package: package.json |
| 50 | + |
| 51 | + - name: Create Tag |
| 52 | + id: create_tag |
| 53 | + uses: jaywcjlove/create-tag-action@main |
| 54 | + with: |
| 55 | + package-path: ./package.json |
| 56 | + |
| 57 | + - name: get tag version |
| 58 | + id: tag_version |
| 59 | + uses: jaywcjlove/changelog-generator@main |
| 60 | + |
| 61 | + - name: Deploy |
| 62 | + uses: peaceiris/actions-gh-pages@v3 |
| 63 | + with: |
| 64 | + commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }} |
| 65 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 66 | + publish_dir: ./build |
| 67 | + user_name: 'github-actions[bot]' |
| 68 | + user_email: 'github-actions[bot]@users.noreply.github.com' |
| 69 | + |
| 70 | + - name: Generate Changelog |
| 71 | + id: changelog |
| 72 | + uses: jaywcjlove/changelog-generator@main |
| 73 | + with: |
| 74 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 75 | + head-ref: ${{steps.create_tag.outputs.version}} |
| 76 | + filter-author: (renovate-bot|Renovate Bot) |
| 77 | + filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' |
| 78 | + |
| 79 | + - name: Create Release |
| 80 | + uses: ncipollo/release-action@v1 |
| 81 | + if: steps.create_tag.outputs.successful |
| 82 | + with: |
| 83 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 84 | + name: ${{ steps.create_tag.outputs.version }} |
| 85 | + tag: ${{ steps.create_tag.outputs.version }} |
| 86 | + body: | |
| 87 | + [](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-code-preview@${{steps.create_tag.outputs.versionNumber}}/file/README.md) |
| 88 | +
|
| 89 | + Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/uiwjs/react-code-preview/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html |
| 90 | + Comparing Changes: ${{ steps.changelog.outputs.compareurl }} |
| 91 | +
|
| 92 | + ```bash |
| 93 | + npm i @uiw/react-code-preview@${{steps.create_tag.outputs.versionNumber}} |
| 94 | + ``` |
| 95 | +
|
| 96 | + ${{ steps.changelog.outputs.changelog }} |
0 commit comments