{"id":28566801,"url":"https://github.com/salsify/action-detect-and-tag-new-version","last_synced_at":"2025-06-10T15:39:00.104Z","repository":{"id":43993340,"uuid":"240297104","full_name":"salsify/action-detect-and-tag-new-version","owner":"salsify","description":"A GitHub action to detect and tag new versions of a repo based on changes to its contents","archived":false,"fork":false,"pushed_at":"2023-07-18T20:56:59.000Z","size":983,"stargazers_count":67,"open_issues_count":22,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-27T17:05:36.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/salsify.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":"2020-02-13T15:42:44.000Z","updated_at":"2025-05-09T16:24:13.000Z","dependencies_parsed_at":"2024-06-18T15:28:59.859Z","dependency_job_id":null,"html_url":"https://github.com/salsify/action-detect-and-tag-new-version","commit_stats":{"total_commits":12,"total_committers":2,"mean_commits":6.0,"dds":0.08333333333333337,"last_synced_commit":"624bb847c54529c8c4175cb36b534b101daae484"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salsify%2Faction-detect-and-tag-new-version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salsify%2Faction-detect-and-tag-new-version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salsify%2Faction-detect-and-tag-new-version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salsify%2Faction-detect-and-tag-new-version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salsify","download_url":"https://codeload.github.com/salsify/action-detect-and-tag-new-version/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salsify%2Faction-detect-and-tag-new-version/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":257746492,"owners_count":22595518,"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":[],"created_at":"2025-06-10T15:38:58.468Z","updated_at":"2025-06-10T15:39:00.090Z","avatar_url":"https://github.com/salsify.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Detect and Tag New Version [![test-status](https://github.com/dfreeman/action-detect-and-tag-new-version/workflows/CI/badge.svg)](https://github.com/dfreeman/action-detect-and-tag-new-version/actions?query=workflow%3ACI)\n\nThis action allows you to detect a new version of your repository based on some change in its contents between commits, creating a git tag if a new version is detected.\n\nFor example, in a JavaScript repo, you could detect that the `version` field in `package.json` had changed from `\"1.0.0\"` to `\"1.1.0\"` and therefore create a `v1.1.0` tag from the current commit.\n\n## Usage\n\nThe configuration below would create a new version tag in your repository any time the contents of a `current-version.txt` file changed.\n\n**Note**: since this action examines your git history to detect changes, you must set a `fetch-depth` of at least `2` with `actions/checkout` for that history to be present.\n\n```yml\n# ...\njobs:\n  tag-new-versions:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n        with:\n          fetch-depth: 2\n      - uses: salsify/action-detect-and-tag-new-version@v2\n        with:\n          version-command: |\n            cat current-version.txt\n```\n\n### Inputs\n\nAll inputs are optional.\n\n - `version-command`: a shell command that will be executed at the current HEAD and the previous commit. This command's\n   output to stdout will be considered the effective version of your repository at a given commit. If unspecified,\n   this action will attempt to determine an appropriate command to run automatically, as described below.\n - `create-tag`: may be set to `false` to only detect version changes and not create a new tag when the version changes.\n - `tag-template`: a template for producing a tag name from the current version of your repository. Any instance of\n   `{VERSION}` in the string will be replaced with the actual detected version. Defaults to `v{VERSION}`.\n - `tag-annotation-template`: a template for producing a tag annotation from the current version of your repository. As\n   with `tag-template`, any instance of `{VERSION}` in the string will be replaced with the actual detected version.\n   May be set to an empty string to produce a lightweight (i.e. annotation-less) tag. Defaults to\n   `Released version {VERSION}`.\n\n### Outputs\n\n - `previous-version`: the detected previous version of this repository\n - `current-version`: the detected current version of this repository\n - `tag`: if a new tag is created, this output will contain its name\n\n## Version Determination\n\nIf no `version-command` input is provided, this action will attempt to do something sensible by default.\n - If it finds a `package.json`, it will consider the contents of the `version` field there to be the repository version.\n - If it finds single `*.gemspec` file, it will consider the version defined there to be the repository version.\n\nThe logic for this detection and the corresponding version commands used can be found in [`determine-version.ts`](src/determine-version.ts).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalsify%2Faction-detect-and-tag-new-version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalsify%2Faction-detect-and-tag-new-version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalsify%2Faction-detect-and-tag-new-version/lists"}