diff options
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/changelog.yml | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index a820c48..e654822 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -3,7 +3,7 @@ name: Deploy on: push: tags: - - v[0-9]+.[0-9]+.[0-9]+ + - v* jobs: deploy: @@ -15,30 +15,35 @@ 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 }} - tag: ${{ github.ref_name }} - useGitmojis: false - includeInvalidCommits: true + fromTag: ${{ github.ref_name }} + toTag: ${{ env.previousTag }} + writeToFile: true reverseOrder: true + includeInvalidCommits: true + useGitmojis: false + excludeTypes: build,docs,other,style - name: Create Release uses: ncipollo/release-action@v1.12.0 with: allowUpdates: true - draft: false + draft: true makeLatest: true name: ${{ github.ref_name }} body: ${{ steps.changelog.outputs.changes }} - 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 + token: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file |
