diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 362fb76..1a7292e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,17 +6,7 @@ on: env: BIN_NAME: pesde jobs: - # Better to check first, runners other than ubuntu-latest take up more free minutes - check: - name: Check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Check - run: cargo check --all-features --locked - build: - needs: [ check ] strategy: matrix: include: @@ -103,16 +93,6 @@ jobs: path: artifacts merge-multiple: true - - name: Generate a changelog - uses: orhun/git-cliff-action@v3 - id: git-cliff - with: - config: cliff.toml - args: --verbose --current --strip header - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_REPO: ${{ github.repository }} - - name: Create Release id: create_release uses: softprops/action-gh-release@v1 @@ -122,5 +102,5 @@ jobs: name: ${{ github.ref_name }} body: ${{ steps.git-cliff.outputs.content }} draft: true - prerelease: false + prerelease: ${{ startsWith(github.ref_name, 'v0') }} files: artifacts/* \ No newline at end of file diff --git a/cliff.toml b/cliff.toml deleted file mode 100644 index c8e459a..0000000 --- a/cliff.toml +++ /dev/null @@ -1,89 +0,0 @@ -[changelog] -header = """ -# Changelog\n -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n -""" - -body = """ -{%- macro remote_url() -%} - https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} -{%- endmacro -%} - -{% if version -%} - ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} -{% else -%} - ## [Unreleased] -{% endif -%} - -### Details\ - -{% for group, commits in commits | group_by(attribute="group") %} - #### {{ group | upper_first }} - {%- for commit in commits %} - - {{ commit.message | upper_first | trim }}\ - {% if commit.github.username %} by @{{ commit.github.username }}{%- endif -%} - {% if commit.github.pr_number %} in \ - [#{{ commit.github.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.github.pr_number }}) \ - {%- endif -%} - {% endfor %} -{% endfor %} - -{%- if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %} - ## New Contributors -{%- endif -%} - -{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %} - * @{{ contributor.username }} made their first contribution - {%- if contributor.pr_number %} in \ - [#{{ contributor.pr_number }}](({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \ - {%- endif %} -{%- endfor %}\n -""" - -footer = """ -{%- macro remote_url() -%} - https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} -{%- endmacro -%} - -{% for release in releases -%} - {% if release.version -%} - {% if release.previous.version -%} - [{{ release.version | trim_start_matches(pat="v") }}]: \ - {{ self::remote_url() }}/compare/{{ release.previous.version }}..{{ release.version }} - {% endif -%} - {% else -%} - [unreleased]: {{ self::remote_url() }}/compare/{{ release.previous.version }}..HEAD - {% endif -%} -{% endfor %} - -""" -trim = true - -[git] -conventional_commits = true -filter_unconventional = false -split_commits = false -commit_parsers = [ - { message = "^feat", group = "Features" }, - { message = "^fix", group = "Bug Fixes" }, - { message = "^doc", group = "Documentation", default_scope = "unscoped" }, - { message = "^perf", group = "Performance" }, - { message = "^refactor", group = "Refactor" }, - { message = "^style", group = "Styling" }, - { message = "^test", group = "Testing" }, - { message = "^chore\\(release\\): prepare for", skip = true }, - { message = "^chore", group = "Miscellaneous Tasks" }, - { message = "^ci", group = "Continuous Integration" }, - { message = "^style", group = "Styling" }, - { body = ".*security", group = "Security" }, - { message = ".*", group = "Miscellaneous Tasks" } -] -protect_breaking_commits = false -filter_commits = false -tag_pattern = "v[0-9].*" -ignore_tags = "" -topo_order = true -sort_commits = "newest" \ No newline at end of file