Skip to content

Commit e7d44f3

Browse files
committed
chore: update workflows config.
1 parent efe2c19 commit e7d44f3

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,65 @@ jobs:
6262
Website: https://jaywcjlove.github.io/github-action-read-file
6363
EOF
6464
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+
6576
- name: Deploy
6677
uses: peaceiris/actions-gh-pages@v3
6778
with:
6879
commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
6980
github_token: ${{ secrets.GITHUB_TOKEN }}
7081
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

Comments
 (0)