diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 00ffe38..640c09c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,25 +3,33 @@ on: tags: - 'v[0-9]+.[0-9]+.[0-9]+' -name: Release - jobs: release: - name: SemVer release + name: Perform release runs-on: ubuntu-latest + permissions: + contents: write steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - token: ${{secrets.GITHUB_TOKEN}} - - run: | - git config user.name github-actions - git config user.email github-actions@github.com - git config --global user.email github-actions@github.com - git config --global user.name github-actions + + - name: Cocogitto release + id: release + uses: cocogitto/cocogitto-action@v3 + with: + release: true + git-user: 'Cog Bot' + git-user-email: 'mycoolproject@org.org' + check-latest-tag-only: true + tag_prefix: 'v' + + - name: Generate Changelog + run: cog changelog --at ${{ steps.release.outputs.version }} -t full_hash > GITHUB_CHANGELOG.md - name: Upload github release uses: softprops/action-gh-release@v1 with: - body_path: CHANGELOG.md + body_path: GITHUB_CHANGELOG.md + tag_name: ${{ steps.release.outputs.version }} token: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index f972cea..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,15 +0,0 @@ -# Changelog -All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines. - -- - - -## v0.7.10 - 2023-10-23 -#### Bug Fixes -- **(fzf)** invalid :Rg command - (fba0bf6) - jiangyinzuo -#### Continuous Integration -- add release.yml - (7801e82) - jiangyinzuo -#### Miscellaneous Chores -- add cog.toml - (d50b16e) - jiangyinzuo - -- - - - -Changelog generated by [cocogitto](https://github.com/cocogitto/cocogitto). \ No newline at end of file diff --git a/cog.toml b/cog.toml index 9193ef3..8e1b995 100644 --- a/cog.toml +++ b/cog.toml @@ -1,4 +1,4 @@ -from_latest_tag = false +from_latest_tag = true ignore_merge_commits = false generate_mono_repository_global_tag = true branch_whitelist = [] @@ -12,6 +12,9 @@ tag_prefix = "v" [git_hooks] [commit_types] +chore = { changelog_title = "Chore", omit_from_changelog = true } +ci = { changelog_title = "CI", omit_from_changelog = true } +docs = { changelog_title = "Docs", omit_from_changelog = true } [changelog] path = "CHANGELOG.md"