Skip to content

Commit

Permalink
chore: update workflows config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Nov 30, 2022
1 parent efe2c19 commit e7d44f3
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,65 @@ jobs:
Website: https://jaywcjlove.github.io/github-action-read-file
EOF
- name: Is a tag/release created auto?
id: create_tag
uses: jaywcjlove/create-tag-action@main
with:
# test: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
package-path: ./package.json

- name: get tag version
id: tag_version
uses: jaywcjlove/changelog-generator@main

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build

- name: Generate Changelog
id: changelog
uses: jaywcjlove/changelog-generator@main
with:
head-ref: ${{steps.create_tag.outputs.version}}
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'

- name: Create Release
uses: jaywcjlove/create-tag-action@main
with:
# test: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
package-path: ./package.json
release: true
body: |
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/jaywcjlove/github-action-read-file/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}
```yml
- name: Read README.md
id: package
uses: jaywcjlove/github-action-read-file@main
with:
path: package.json
- name: Echo package.json
run: echo "${{ steps.package.outputs.content }}"
```
Specify the **branch** to read the file content
```yml
- name: Read README.md(gh-pages)
id: ghpages
uses: jaywcjlove/github-action-read-file@main
with:
branch: gh-pages
path: README.md
- name: Echo README.md(gh-pages)
run: echo "${{ steps.ghpages.outputs.content }}"
```

0 comments on commit e7d44f3

Please sign in to comment.