|
7 | 7 | build-deploy: |
8 | 8 | runs-on: ubuntu-18.04 |
9 | 9 | steps: |
10 | | - - uses: actions/checkout@v3 |
11 | | - - uses: actions/setup-node@v3 |
12 | | - with: |
13 | | - node-version: 16 |
14 | | - |
15 | | - - run: npm install |
16 | | - - run: npm run build |
17 | | - - run: npm run doc |
18 | | - |
19 | | - - name: Generate Contributors Images |
20 | | - uses: jaywcjlove/github-action-contributors@main |
21 | | - with: |
22 | | - filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\]) |
23 | | - output: build/CONTRIBUTORS.svg |
24 | | - avatarSize: 42 |
25 | | - |
26 | | - - name: Create Tag |
27 | | - id: create_tag |
28 | | - uses: jaywcjlove/create-tag-action@v1.3.7 |
29 | | - with: |
30 | | - package-path: ./package.json |
31 | | - |
32 | | - - name: get tag version |
33 | | - id: tag_version |
34 | | - uses: jaywcjlove/changelog-generator@v1.5.7 |
35 | | - |
36 | | - - name: Deploy |
37 | | - uses: peaceiris/actions-gh-pages@v3 |
38 | | - with: |
39 | | - commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }} |
40 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
41 | | - publish_dir: ./build |
42 | | - |
43 | | - - name: Generate Changelog |
44 | | - id: changelog |
45 | | - uses: jaywcjlove/changelog-generator@v1.5.7 |
46 | | - with: |
47 | | - head-ref: ${{steps.create_tag.outputs.version}} |
48 | | - filter-author: (小弟调调™) |
49 | | - filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' |
50 | | - |
51 | | - - name: Create Release |
52 | | - uses: ncipollo/release-action@v1 |
53 | | - if: steps.create_tag.outputs.successful |
54 | | - with: |
55 | | - token: ${{ secrets.GITHUB_TOKEN }} |
56 | | - name: ${{ steps.create_tag.outputs.version }} |
57 | | - tag: ${{ steps.create_tag.outputs.version }} |
58 | | - body: | |
59 | | - [](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-markdown-editor@${{steps.create_tag.outputs.versionNumber}}/file/README.md) [](https://bundlephobia.com/result?p=@uiw/react-markdown-editor@${{steps.create_tag.outputs.versionNumber}}) [](https://www.npmjs.com/package/@uiw/react-markdown-editor) |
60 | | -
|
61 | | - Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/uiwjs/react-markdown-editor/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html |
62 | | - Comparing Changes: ${{ steps.changelog.outputs.compareurl }} |
63 | | -
|
64 | | - ```bash |
65 | | - npm i @uiw/react-markdown-editor@${{steps.create_tag.outputs.versionNumber}} |
66 | | - ``` |
67 | | -
|
68 | | - ${{ steps.changelog.outputs.changelog }} |
69 | | -
|
70 | | - - name: 📦 @uiw/react-markdown-editor 📦 |
71 | | - uses: JS-DevTools/npm-publish@v1 |
72 | | - with: |
73 | | - token: ${{ secrets.NPM_TOKEN }} |
74 | | - package: ./package.json |
| 10 | + - uses: actions/checkout@v3 |
| 11 | + - uses: actions/setup-node@v3 |
| 12 | + with: |
| 13 | + node-version: 16 |
| 14 | + |
| 15 | + - run: npm install |
| 16 | + - run: npm run build |
| 17 | + - run: npm run doc |
| 18 | + |
| 19 | + - name: Generate Contributors Images |
| 20 | + uses: jaywcjlove/github-action-contributors@main |
| 21 | + with: |
| 22 | + filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\]) |
| 23 | + output: build/CONTRIBUTORS.svg |
| 24 | + avatarSize: 42 |
| 25 | + |
| 26 | + - name: Create Tag |
| 27 | + id: create_tag |
| 28 | + uses: jaywcjlove/create-tag-action@v1.3.7 |
| 29 | + with: |
| 30 | + package-path: ./package.json |
| 31 | + |
| 32 | + - name: get tag version |
| 33 | + id: tag_version |
| 34 | + uses: jaywcjlove/changelog-generator@v1.5.7 |
| 35 | + |
| 36 | + - name: Deploy |
| 37 | + uses: peaceiris/actions-gh-pages@v3 |
| 38 | + with: |
| 39 | + commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }} |
| 40 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 41 | + publish_dir: ./build |
| 42 | + |
| 43 | + - name: Generate Changelog |
| 44 | + id: changelog |
| 45 | + uses: jaywcjlove/changelog-generator@v1.5.7 |
| 46 | + with: |
| 47 | + head-ref: ${{steps.create_tag.outputs.version}} |
| 48 | + filter-author: (小弟调调™) |
| 49 | + filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' |
| 50 | + |
| 51 | + - name: Create Release |
| 52 | + uses: ncipollo/release-action@v1 |
| 53 | + if: steps.create_tag.outputs.successful |
| 54 | + with: |
| 55 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 56 | + name: ${{ steps.create_tag.outputs.version }} |
| 57 | + tag: ${{ steps.create_tag.outputs.version }} |
| 58 | + body: | |
| 59 | + [](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-markdown-editor@${{steps.create_tag.outputs.versionNumber}}/file/README.md) [](https://bundlephobia.com/result?p=@uiw/react-markdown-editor@${{steps.create_tag.outputs.versionNumber}}) [](https://www.npmjs.com/package/@uiw/react-markdown-editor) |
| 60 | +
|
| 61 | + Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/uiwjs/react-markdown-editor/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html |
| 62 | + Comparing Changes: ${{ steps.changelog.outputs.compareurl }} |
| 63 | +
|
| 64 | + ```bash |
| 65 | + npm i @uiw/react-markdown-editor@${{steps.create_tag.outputs.versionNumber}} |
| 66 | + ``` |
| 67 | +
|
| 68 | + ${{ steps.changelog.outputs.changelog }} |
| 69 | +
|
| 70 | + - name: 📦 @uiw/react-markdown-editor 📦 |
| 71 | + uses: JS-DevTools/npm-publish@v1 |
| 72 | + with: |
| 73 | + token: ${{ secrets.NPM_TOKEN }} |
| 74 | + package: ./package.json |
| 75 | + |
| 76 | + outputs: |
| 77 | + successful: ${{steps.create_tag.outputs.successful }} |
| 78 | + |
| 79 | + github-package: |
| 80 | + runs-on: ubuntu-18.04 |
| 81 | + needs: build-deploy |
| 82 | + if: needs.build-deploy.outputs.successful |
| 83 | + steps: |
| 84 | + - uses: actions/checkout@v3 |
| 85 | + - uses: actions/setup-node@v3 |
| 86 | + with: |
| 87 | + node-version: 16 |
| 88 | + registry-url: https://npm.pkg.github.com |
| 89 | + scope: '@uiwjs' |
| 90 | + |
| 91 | + - run: npm install |
| 92 | + - run: npm run build |
| 93 | + |
| 94 | + - name: "Modify @uiw/react-markdown-editor => @uiwjs/react-markdown-editor" |
| 95 | + uses: jaywcjlove/github-action-package@main |
| 96 | + with: |
| 97 | + path: core/package.json |
| 98 | + data: | |
| 99 | + { "name": "@uiwjs/react-markdown-editor" } |
| 100 | +
|
| 101 | + - run: npm publish |
| 102 | + env: |
| 103 | + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} |
0 commit comments