diff options
| author | 2024-08-15 19:00:40 +0800 | |
|---|---|---|
| committer | 2024-08-15 19:00:40 +0800 | |
| commit | 0ce9d0ec0a712d421e696de3526f12973281f079 (patch) | |
| tree | 8eb7e42c034421cfd40176985d2a1502ef7cd297 | |
| parent | b8bd9b2178cf162517d3534c32109c449615ded2 (diff) | |
| download | faq-0ce9d0ec0a712d421e696de3526f12973281f079.tar.gz faq-0ce9d0ec0a712d421e696de3526f12973281f079.zip | |
chore(工作流): 优化工作流获取提交的记录方式v0.0.10
| -rw-r--r-- | .github/workflows/changelog.yml | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 0a27ddc..57c5645 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -15,23 +15,13 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Get previous tag - id: previousTag - run: | - name=$(git --no-pager tag --sort=creatordate --merged ${{ github.ref_name }} | tail -2 | head -1) - echo "previousTag: $name" - echo "previousTag=$name" >> $GITHUB_ENV - name: Update CHANGELOG id: changelog uses: requarks/changelog-action@v1 with: token: ${{ github.token }} - fromTag: ${{ github.ref_name }} - toTag: ${{ env.previousTag }} + tag: ${{ github.ref_name }} writeToFile: true reverseOrder: true includeInvalidCommits: true @@ -41,8 +31,15 @@ jobs: uses: ncipollo/release-action@v1.12.0 with: allowUpdates: true - draft: true + draft: false makeLatest: true name: ${{ github.ref_name }} body: ${{ steps.changelog.outputs.changes }} - token: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file + token: ${{ github.token }} + + - name: Commit CHANGELOG.md + uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: main + commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]' + file_pattern: CHANGELOG.md
\ No newline at end of file |
