{"id":16232221,"url":"https://github.com/mathieudutour/github-tag-action","last_synced_at":"2025-05-14T15:07:25.727Z","repository":{"id":37611977,"uuid":"218823535","full_name":"mathieudutour/github-tag-action","owner":"mathieudutour","description":"A Github Action to automatically bump and tag master, on merge, with the latest SemVer formatted version. Works on any platform.","archived":false,"fork":false,"pushed_at":"2024-08-30T13:20:34.000Z","size":5646,"stargazers_count":670,"open_issues_count":77,"forks_count":218,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-05T19:17:10.384Z","etag":null,"topics":["git","github-actions","tag"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/github-tag","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathieudutour.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["mathieudutour"]}},"created_at":"2019-10-31T17:36:35.000Z","updated_at":"2025-05-05T18:14:30.000Z","dependencies_parsed_at":"2024-06-18T08:46:59.120Z","dependency_job_id":"32e40bbd-ec2a-46c5-a6dc-75335abba3cb","html_url":"https://github.com/mathieudutour/github-tag-action","commit_stats":{"total_commits":141,"total_committers":31,"mean_commits":4.548387096774194,"dds":0.5319148936170213,"last_synced_commit":"9d35d648e836d5db77936aa35a3a5c7bc16092c8"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieudutour%2Fgithub-tag-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieudutour%2Fgithub-tag-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieudutour%2Fgithub-tag-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathieudutour%2Fgithub-tag-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathieudutour","download_url":"https://codeload.github.com/mathieudutour/github-tag-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253234508,"owners_count":21875633,"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":["git","github-actions","tag"],"created_at":"2024-10-10T13:08:26.406Z","updated_at":"2025-05-14T15:07:24.697Z","avatar_url":"https://github.com/mathieudutour.png","language":"TypeScript","funding_links":["https://github.com/sponsors/mathieudutour"],"categories":["TypeScript"],"sub_categories":[],"readme":"# GitHub Tag Action\n\nA GitHub Action to automatically bump and tag master, on merge, with the latest SemVer formatted version. Works on any platform.\n\n## Usage\n\n```yaml\nname: Bump version\non:\n  push:\n    branches:\n      - master\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - name: Bump version and push tag\n        id: tag_version\n        uses: mathieudutour/github-tag-action@v6.2\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n      - name: Create a GitHub release\n        uses: ncipollo/release-action@v1\n        with:\n          tag: ${{ steps.tag_version.outputs.new_tag }}\n          name: Release ${{ steps.tag_version.outputs.new_tag }}\n          body: ${{ steps.tag_version.outputs.changelog }}\n```\n\n### 📥 Inputs\n\n- **github_token** _(required)_ - Required for permission to tag the repo. Usually `${{ secrets.GITHUB_TOKEN }}`.\n- **commit_sha** _(optional)_ - The commit SHA value to add the tag. If specified, it uses this value instead GITHUB_SHA. It could be useful when a previous step merged a branch into github.ref.\n\n#### Fetch all tags\n\n- **fetch_all_tags** _(optional)_ - By default, this action fetch the last 100 tags from Github. Sometimes, this is not enough and using this action will fetch all tags recursively (default: `false`).\n\n#### Filter branches\n\n- **release_branches** _(optional)_ - Comma separated list of branches (JavaScript regular expression accepted) that will generate the release tags. Other branches and pull-requests generate versions postfixed with the commit hash and do not generate any repository tag. Examples: `master` or `.*` or `release.*,hotfix.*,master`... (default: `master,main`).\n- **pre_release_branches** _(optional)_ - Comma separated list of branches (JavaScript regular expression accepted) that will generate the pre-release tags.\n\n#### Customize the tag\n\n- **default_bump** _(optional)_ - Which type of bump to use when [none is explicitly provided](#bumping) when commiting to a release branch (default: `patch`). You can also set `false` to avoid generating a new tag when none is explicitly provided. Can be `patch, minor or major`.\n- **default_prerelease_bump** _(optional)_ - Which type of bump to use when [none is explicitly provided](#bumping) when commiting to a prerelease branch (default: `prerelease`). You can also set `false` to avoid generating a new tag when none is explicitly provided. Can be `prerelease, prepatch, preminor or premajor`.\n- **custom_tag** _(optional)_ - Custom tag name. If specified, it overrides bump settings.\n- **create_annotated_tag** _(optional)_ - Boolean to create an annotated rather than a lightweight one (default: `false`).\n- **tag_prefix** _(optional)_ - A prefix to the tag name (default: `v`).\n- **append_to_pre_release_tag** _(optional)_ - A suffix to the pre-release tag name (default: `\u003cbranch\u003e`).\n\n#### Customize the conventional commit messages \u0026 titles of changelog sections\n\n- **custom_release_rules** _(optional)_ - Comma separated list of release rules.\n\n  __Format__: `\u003ckeyword\u003e:\u003crelease_type\u003e:\u003cchangelog_section\u003e` where `\u003cchangelog_section\u003e` is optional and will default to [Angular's conventions](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular).\n\n  __Examples__:\n    1. `hotfix:patch,pre-feat:preminor`,\n    2. `bug:patch:Bug Fixes,chore:patch:Chores`\n\n#### Debugging\n\n- **dry_run** _(optional)_ - Do not perform tagging, just calculate next version and changelog, then exit\n\n### 📤 Outputs\n\n- **new_tag** - The value of the newly calculated tag. Note that if there hasn't been any new commit, this will be `undefined`.\n- **new_version** - The value of the newly created tag without the prefix. Note that if there hasn't been any new commit, this will be `undefined`.\n- **previous_tag** - The value of the previous tag (or `v0.0.0` if none). Note that if `custom_tag` is set, this will be `undefined`.\n- **previous_version** - The value of the previous tag (or `0.0.0` if none) without the prefix. Note that if `custom_tag` is set, this will be `undefined`.\n- **release_type** - The computed release type (`major`, `minor`, `patch` or `custom` - can be prefixed with `pre`).\n- **changelog** - The [conventional changelog](https://github.com/conventional-changelog/conventional-changelog) since the previous tag.\n\n\u003e **_Note:_** This action creates a [lightweight tag](https://developer.github.com/v3/git/refs/#create-a-reference) by default.\n\n### Bumping\n\nThe action will parse the new commits since the last tag using the [semantic-release](https://github.com/semantic-release/semantic-release) conventions.\n\nsemantic-release uses the commit messages to determine the type of changes in the codebase. Following formalized conventions for commit messages, semantic-release automatically determines the next [semantic version](https://semver.org) number.\n\nBy default semantic-release uses [Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines).\n\nHere is an example of the release type that will be done based on a commit messages:\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e Commit message \u003c/td\u003e \u003ctd\u003e Release type \u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n```\nfix(pencil): stop graphite breaking when too much pressure applied\n```\n\n\u003c/td\u003e\n\u003ctd\u003ePatch Release\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n```\nfeat(pencil): add 'graphiteWidth' option\n```\n\n\u003c/td\u003e\n\u003ctd\u003eMinor Release\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n```\nperf(pencil): remove graphiteWidth option\n\nBREAKING CHANGE: The graphiteWidth option has been removed.\nThe default graphite width of 10mm is always used for performance reasons.\n```\n\n\u003c/td\u003e\n\u003ctd\u003eMajor Release\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\nIf no commit message contains any information, then **default_bump** will be used.\n\n## Credits\n\n[anothrNick/github-tag-action](https://github.com/anothrNick/github-tag-action) - a similar action using a Dockerfile (hence not working on macOS)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathieudutour%2Fgithub-tag-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathieudutour%2Fgithub-tag-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathieudutour%2Fgithub-tag-action/lists"}