|
62 | 62 | Website: https://jaywcjlove.github.io/github-action-read-file |
63 | 63 | EOF |
64 | 64 |
|
| 65 | + - name: Is a tag/release created auto? |
| 66 | + id: create_tag |
| 67 | + uses: jaywcjlove/create-tag-action@main |
| 68 | + with: |
| 69 | + # test: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' |
| 70 | + package-path: ./package.json |
| 71 | + |
| 72 | + - name: get tag version |
| 73 | + id: tag_version |
| 74 | + uses: jaywcjlove/changelog-generator@main |
| 75 | + |
65 | 76 | - name: Deploy |
66 | 77 | uses: peaceiris/actions-gh-pages@v3 |
67 | 78 | with: |
68 | 79 | commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }} |
69 | 80 | github_token: ${{ secrets.GITHUB_TOKEN }} |
70 | 81 | publish_dir: ./build |
| 82 | + |
| 83 | + - name: Generate Changelog |
| 84 | + id: changelog |
| 85 | + uses: jaywcjlove/changelog-generator@main |
| 86 | + with: |
| 87 | + head-ref: ${{steps.create_tag.outputs.version}} |
| 88 | + filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' |
| 89 | + |
| 90 | + - name: Create Release |
| 91 | + uses: jaywcjlove/create-tag-action@main |
| 92 | + with: |
| 93 | + # test: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' |
| 94 | + package-path: ./package.json |
| 95 | + release: true |
| 96 | + body: | |
| 97 | + Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/jaywcjlove/github-action-read-file/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html |
| 98 | + Comparing Changes: ${{ steps.changelog.outputs.compareurl }} |
| 99 | +
|
| 100 | + ${{ steps.changelog.outputs.changelog }} |
| 101 | +
|
| 102 | +
|
| 103 | + ```yml |
| 104 | + - name: Read README.md |
| 105 | + id: package |
| 106 | + uses: jaywcjlove/github-action-read-file@main |
| 107 | + with: |
| 108 | + path: package.json |
| 109 | +
|
| 110 | + - name: Echo package.json |
| 111 | + run: echo "${{ steps.package.outputs.content }}" |
| 112 | + ``` |
| 113 | +
|
| 114 | + Specify the **branch** to read the file content |
| 115 | +
|
| 116 | + ```yml |
| 117 | + - name: Read README.md(gh-pages) |
| 118 | + id: ghpages |
| 119 | + uses: jaywcjlove/github-action-read-file@main |
| 120 | + with: |
| 121 | + branch: gh-pages |
| 122 | + path: README.md |
| 123 | +
|
| 124 | + - name: Echo README.md(gh-pages) |
| 125 | + run: echo "${{ steps.ghpages.outputs.content }}" |
| 126 | + ``` |
0 commit comments