{"id":14069618,"url":"https://github.com/orhun/git-cliff-action","last_synced_at":"2025-05-16T13:07:45.910Z","repository":{"id":40559190,"uuid":"377964066","full_name":"orhun/git-cliff-action","owner":"orhun","description":"GitHub action to generate a changelog based on the Git history","archived":false,"fork":false,"pushed_at":"2025-04-12T09:19:35.000Z","size":130,"stargazers_count":142,"open_issues_count":5,"forks_count":17,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-12T11:55:35.198Z","etag":null,"topics":["changelog","changelog-generator","generator","git-cliff","github-actions","github-actions-docker"],"latest_commit_sha":null,"homepage":"https://github.com/orhun/git-cliff","language":"Shell","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/orhun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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,"zenodo":null}},"created_at":"2021-06-17T21:24:56.000Z","updated_at":"2025-04-12T09:19:39.000Z","dependencies_parsed_at":"2023-11-12T23:24:27.698Z","dependency_job_id":"cb7d28aa-9f80-4168-9956-4def896855f4","html_url":"https://github.com/orhun/git-cliff-action","commit_stats":{"total_commits":99,"total_committers":11,"mean_commits":9.0,"dds":0.505050505050505,"last_synced_commit":"4a4a951bc43fafe41cd2348d181853f52356bee7"},"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orhun%2Fgit-cliff-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orhun%2Fgit-cliff-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orhun%2Fgit-cliff-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orhun%2Fgit-cliff-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orhun","download_url":"https://codeload.github.com/orhun/git-cliff-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254535829,"owners_count":22087399,"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":["changelog","changelog-generator","generator","git-cliff","github-actions","github-actions-docker"],"created_at":"2024-08-13T07:07:05.467Z","updated_at":"2025-05-16T13:07:45.886Z","avatar_url":"https://github.com/orhun.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# [git-cliff](https://github.com/orhun/git-cliff) action ⛰️\n\nThis action generates a changelog based on your Git history using [git-cliff](https://github.com/orhun/git-cliff) on the fly!\n\n## Usage\n\n### Input variables\n\n- `version`: `git-cliff` version to use. (e.g. `\"latest\"`, `\"v2.7.0\"`)\n- `config`: Path of the configuration file. (Default: `\"cliff.toml\"`)\n- `args`: [Arguments](https://github.com/orhun/git-cliff#usage) to pass to git-cliff. (Default: `\"-v\"`)\n- `github_token`: The GitHub API token used to get `git-cliff` release information via the GitHub API to avoid rate limits. (Default: `${{ github.token }}`)\n\n### Output variables\n\n- `changelog`: Output file that contains the generated changelog.\n- `content`: Content of the changelog.\n- `version`: Version of the latest release.\n\n### Environment variables\n\n- `OUTPUT`: Output file. (Default: `\"git-cliff/CHANGELOG.md\"`)\n\n\u003e [!IMPORTANT]\n\u003e Check out the entire history via `fetch-depth: 0` before running this action.\n\u003e\n\u003e ```yaml\n\u003e - name: Checkout\n\u003e   uses: actions/checkout@v4\n\u003e   with:\n\u003e     fetch-depth: 0\n\u003e ```\n\u003e\n\u003e Otherwise, you might end up getting empty changelogs or `git ref` errors depending on arguments passed to `git-cliff`.\n\n### Running the action outside of GitHub\n\nIf you run the action in Gitea or GitHub Enterprise, the `github_token` input is invalid. You have two options:\n\n- Pass an empty value (`github_token: \"\"`) (limit of 60 requests per hour per IP address).\n- Create a GitHub token and pass it through GitHub secrets to avoid rate limiting.\n\n### Examples\n\n#### Simple\n\nThe following example fetches the whole Git history (`fetch-depth: 0`), generates a changelog in `./CHANGELOG.md`, and prints it out.\n\n```yml\njobs:\n  changelog:\n    name: Generate changelog\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Generate a changelog\n        uses: orhun/git-cliff-action@v4\n        id: git-cliff\n        with:\n          config: cliff.toml\n          args: --verbose\n        env:\n          OUTPUT: CHANGELOG.md\n\n      - name: Print the changelog\n        run: cat \"${{ steps.git-cliff.outputs.changelog }}\"\n```\n\n#### Advanced\n\nThe following example generates a changelog for the latest pushed tag and sets it as the body of the release.\n\nIt uses [svenstaro/upload-release-action](https://github.com/svenstaro/upload-release-action) for uploading the release assets.\n\n```yml\njobs:\n  changelog:\n    name: Generate changelog\n    runs-on: ubuntu-latest\n    outputs:\n      release_body: ${{ steps.git-cliff.outputs.content }}\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Generate a changelog\n        uses: orhun/git-cliff-action@v4\n        id: git-cliff\n        with:\n          config: cliff.toml\n          args: -vv --latest --strip header\n        env:\n          OUTPUT: CHANGES.md\n          GITHUB_REPO: ${{ github.repository }}\n\n      # use release body in the same job\n      - name: Upload the binary releases\n        uses: svenstaro/upload-release-action@v2\n        with:\n          file: binary_release.zip\n          repo_token: ${{ secrets.GITHUB_TOKEN }}\n          tag: ${{ github.ref }}\n          body: ${{ steps.git-cliff.outputs.content }}\n\n  # use release body in another job\n  upload:\n    name: Upload the release\n    needs: changelog\n    runs-on: ubuntu-latest\n    steps:\n      - name: Upload the binary releases\n        uses: svenstaro/upload-release-action@v2\n        with:\n          file: binary_release.zip\n          repo_token: ${{ secrets.GITHUB_TOKEN }}\n          tag: ${{ github.ref }}\n          body: ${{ needs.changelog.outputs.release_body }}\n```\n\n#### Committing the changelog\n\nYou can use this action as follows if you want to generate a changelog and commit it to the repository:\n\n```yml\njobs:\n  changelog:\n    name: Generate changelog\n    runs-on: ubuntu-latest\n    permissions:\n      contents: write\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Generate changelog\n        uses: orhun/git-cliff-action@v4\n        with:\n          config: cliff.toml\n          args: --verbose\n        env:\n          OUTPUT: CHANGELOG.md\n          GITHUB_REPO: ${{ github.repository }}\n\n      - name: Commit\n        run: |\n          git checkout \u003cbranch\u003e\n          git config user.name 'github-actions[bot]'\n          git config user.email 'github-actions[bot]@users.noreply.github.com'\n          set +e\n          git add CHANGELOG.md\n          git commit -m \"Update changelog\"\n          git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git \u003cbranch\u003e\n```\n\nPlease note that you need to change the `\u003cbranch\u003e` to the branch name that you want to push.\n\n## License\n\nLicensed under either of [Apache License Version 2.0](./LICENSE-APACHE) or [The MIT License](./LICENSE-MIT) at your option.\n\n## Copyright\n\nCopyright © 2021-2024, [Orhun Parmaksız](mailto:orhunparmaksiz@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forhun%2Fgit-cliff-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forhun%2Fgit-cliff-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forhun%2Fgit-cliff-action/lists"}