{"id":21338264,"url":"https://github.com/smlx/ccv","last_synced_at":"2025-06-27T18:05:58.921Z","repository":{"id":36960129,"uuid":"336825259","full_name":"smlx/ccv","owner":"smlx","description":"Conventional Commits Versioner","archived":false,"fork":false,"pushed_at":"2024-05-23T04:29:38.000Z","size":283,"stargazers_count":20,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-23T04:58:46.853Z","etag":null,"topics":["continuous-delivery","git","github","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smlx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-07T15:51:29.000Z","updated_at":"2024-06-02T09:27:28.677Z","dependencies_parsed_at":"2023-11-28T05:23:32.777Z","dependency_job_id":"36ec5a76-cb4c-4bc9-b76f-70fd691db447","html_url":"https://github.com/smlx/ccv","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smlx%2Fccv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smlx%2Fccv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smlx%2Fccv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smlx%2Fccv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smlx","download_url":"https://codeload.github.com/smlx/ccv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225820243,"owners_count":17529144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["continuous-delivery","git","github","go","golang"],"created_at":"2024-11-22T00:12:17.888Z","updated_at":"2025-06-27T18:05:58.904Z","avatar_url":"https://github.com/smlx.png","language":"Go","readme":"# Conventional Commits Versioner\n\n[![Release](https://github.com/smlx/ccv/actions/workflows/release.yaml/badge.svg)](https://github.com/smlx/ccv/actions/workflows/release.yaml)\n[![coverage](https://raw.githubusercontent.com/smlx/ccv/badges/.badges/main/coverage.svg)](https://github.com/smlx/ccv/actions/workflows/coverage.yaml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/smlx/ccv)](https://goreportcard.com/report/github.com/smlx/ccv)\n\n`ccv` does one thing: it walks git commit history back from the current `HEAD` to find the most recent tag, taking note of commit messages along the way.\nWhen it reaches the most recent tag, it uses the commit messages it saw to figure out how the tag should be incremented, and prints the incremented tag.\n\n`ccv` is intended for use in continuous delivery automation.\n\nThe ideas behind `ccv` are described by [Conventional Commits](https://www.conventionalcommits.org/) and [Semantic Versioning](https://semver.org/). Currently parts 1 to 3 of the Conventional Commits specification summary are recognized when incrementing versions.\n\n## Use as a Github Action\n\nThis repository is also a [Github Action](https://docs.github.com/en/actions).\n\nInputs:\n\n* `write-tag`: If true, and ccv determines that a new version is required, the action will automatically write the new version tag to the repository. Default `true`.\n\nOutputs:\n\n* `new-tag`: Either \"true\" or \"false\" depending on whether a new tag was pushed. Example: `true`.\n* `new-tag-version`: The new version that was tagged. This will only be set if new_tag=true. Example: `v0.1.2`.\n* `new-tag-version-type`: The new version type (major, minor, patch) was tagged. This will only be set if new_tag=true. Example: `minor`.\n\n### Example: automatic tagging\n\nThe main use-case of this action is to automatically tag and build new releases in a fully automated release workflow.\n\n```yaml\nname: release\non:\n  push:\n    branches:\n    - main\npermissions: {}\njobs:\n  release-tag:\n    permissions:\n      # create tag\n      contents: write\n    runs-on: ubuntu-latest\n    outputs:\n      new-tag: ${{ steps.ccv.outputs.new-tag }}\n    steps:\n    - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n      with:\n        fetch-depth: 0\n    - name: Bump tag if necessary\n      id: ccv\n      uses: smlx/ccv@7318e2f25a52dcd550e75384b84983973251a1f8 # v0.10.0\n  release-build:\n    permissions:\n      # create release\n      contents: write\n      # push docker images to registry\n      packages: write\n    needs: release-tag\n    if: needs.release-tag.outputs.new-tag == 'true'\n    runs-on: ubuntu-latest\n    steps:\n    # ... build and release steps here\n```\n\nFor a fully-functional example, see the [release workflow of this repository](https://github.com/smlx/ccv/blob/main/.github/workflows/release.yaml).\n\n### Example: read-only\n\nYou can also check the tag your PR will generate by running with `write-tag: false`. Note that the permissions on this job are read-only.\n\n```yaml\nname: build\non:\n  pull_request:\n    branches:\n    - main\npermissions: {}\njobs:\n  check-tag:\n    permissions:\n      contents: read\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4\n      with:\n        fetch-depth: 0\n    - id: ccv\n      uses: smlx/ccv@c5f6769c943c082c4e8d8ccf2ec4b6f5f517e1f2 # v0.7.3\n      with:\n        write-tag: false\n    - run: |\n        echo \"new-tag=$NEW_TAG\"\n        echo \"new-tag-version=$NEW_TAG_VERSION\"\n        echo \"new-tag-version-type=$NEW_TAG_VERSION_TYPE\"\n      env:\n        NEW_TAG: ${{steps.ccv.outputs.new-tag}}\n        NEW_TAG_VERSION: ${{steps.ccv.outputs.new-tag-version}}\n        NEW_TAG_VERSION_TYPE: ${{steps.ccv.outputs.new-tag-version-type}}\n```\n\nGives this output:\n\n```\nnew-tag=true\nnew-tag-version=v0.16.0\nnew-tag-version-type=minor\n```\n\nFor a fully-functional example, see the [build workflow of this repository](https://github.com/smlx/ccv/blob/main/.github/workflows/build.yaml).\n\n## Use locally\n\nDownload the latest [release](https://github.com/smlx/ccv/releases) on github, or:\n\n```\ngo install github.com/smlx/ccv/cmd/ccv@latest\n```\n\nRun `ccv` in the directory containing your git repository.\n\n## Prior art\n\n* [caarlos0/svu](https://github.com/caarlos0/svu) does pretty much the same thing, but it has more features and shells out to git. `ccv` uses [go-git/go-git](https://github.com/go-git/go-git) instead.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmlx%2Fccv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmlx%2Fccv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmlx%2Fccv/lists"}