{"id":19061263,"url":"https://github.com/madhead/semver-utils","last_synced_at":"2025-08-20T22:40:09.505Z","repository":{"id":37791498,"uuid":"350844273","full_name":"madhead/semver-utils","owner":"madhead","description":"One-stop shop for working with semantic versions in your GitHub Actions workflows","archived":false,"fork":false,"pushed_at":"2024-11-22T20:47:49.000Z","size":3458,"stargazers_count":27,"open_issues_count":6,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-06T04:40:02.629Z","etag":null,"topics":["actions","github-actions","semantic-versions","semver","utils"],"latest_commit_sha":null,"homepage":"","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/madhead.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.adoc","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["madhead"]}},"created_at":"2021-03-23T20:12:32.000Z","updated_at":"2025-07-29T11:40:23.000Z","dependencies_parsed_at":"2024-06-05T10:52:13.922Z","dependency_job_id":"cd00a95b-fac8-4a20-8a4e-54a6c4704b1b","html_url":"https://github.com/madhead/semver-utils","commit_stats":{"total_commits":485,"total_committers":3,"mean_commits":"161.66666666666666","dds":"0.16907216494845356","last_synced_commit":"36d1e0ed361bd7b4b77665de8093092eaeabe6ba"},"previous_names":[],"tags_count":61,"template":false,"template_full_name":"actions/typescript-action","purl":"pkg:github/madhead/semver-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madhead%2Fsemver-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madhead%2Fsemver-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madhead%2Fsemver-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madhead%2Fsemver-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madhead","download_url":"https://codeload.github.com/madhead/semver-utils/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madhead%2Fsemver-utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271399092,"owners_count":24752807,"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","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["actions","github-actions","semantic-versions","semver","utils"],"created_at":"2024-11-09T00:19:44.287Z","updated_at":"2025-08-20T22:40:09.447Z","avatar_url":"https://github.com/madhead.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/madhead/semver-utils/actions\"\u003e\n    \u003cimg alt=\"madhead/semver-utils status\" src=\"https://github.com/madhead/semver-utils/actions/workflows/default.yml/badge.svg\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# madhead/semver-utils\n\nOne-stop shop for working with semantic versions in your GitHub Actions workflows.\nA wrapper around [semver](https://www.npmjs.com/package/semver), so read [its docs](https://github.com/npm/node-semver#functions) to know more about supported operations.\n\n## Usage\n\n```yml\n- uses: madhead/semver-utils@latest\n  id: version\n  with:\n    # A version to work with\n    version: 1.2.3+42.24\n\n    # A version to compare against\n    compare-to: 2.1.0\n\n    # A range to check against\n    satisfies: 1.x\n- run: |\n    echo \"${{ steps.version.outputs.release }}\"           # 1.2.3\n    echo \"${{ steps.version.outputs.major }}\"             # 1\n    echo \"${{ steps.version.outputs.minor }}\"             # 2\n    echo \"${{ steps.version.outputs.patch }}\"             # 3\n    echo \"${{ steps.version.outputs.build }}\"             # 42.24\n    echo \"${{ steps.version.outputs.build-parts }}\"       # 2\n    echo \"${{ steps.version.outputs.build-0 }}\"           # 42\n    echo \"${{ steps.version.outputs.build-1 }}\"           # 24\n    echo \"${{ steps.version.outputs.comparison-result }}\" # \u003c\n    echo \"${{ steps.version.outputs.satisfies }}\"         # true\n    echo \"${{ steps.version.outputs.inc-major }}\"         # 2.0.0\n    echo \"${{ steps.version.outputs.inc-premajor }}\"      # 2.0.0-0\n    echo \"${{ steps.version.outputs.inc-minor }}\"         # 1.3.0\n    echo \"${{ steps.version.outputs.inc-preminor }}\"      # 1.3.0-0\n    echo \"${{ steps.version.outputs.inc-patch }}\"         # 1.2.4\n    echo \"${{ steps.version.outputs.inc-prepatch }}\"      # 1.2.4-0\n    echo \"${{ steps.version.outputs.inc-prerelease }}\"    # 1.2.4-0\n```\n\nIf the version cannot be parsed, all the outputs [will be equal to an empty string](.github/workflows/default.yml#L27-L35), unless `lenient` is set to `false` explicitly.\nIf `lenient` is `false`, the action [will fail](.github/workflows/default.yml#L18-L25).\n\n```yml\n- uses: madhead/semver-utils@latest\n  id: lenient\n  with:\n    version: invalid\n- run: |\n    echo \"${{ steps.lenient.outputs.release }}\"           # (empty string)\n\n- uses: madhead/semver-utils@latest\n  id: strict\n  with:\n    version: invalid\n    lenient: false\n  continue-on-error: true                                 # failure is expected and acceptable for this example\n- run: |\n    echo \"${{ steps.strict.outcome }}\"                    # failure\n```\n\nTo see the list of available versions (`latest` in the example above), navigate to the [Releases \u0026 Tags](https://github.com/madhead/semver-utils/tags) page of this repo.\nWhenever a new version is released, corresponding tags are created / updated.\n`latest` tag always points to the latest release (i.e. it's the same as using `main` branch).\nThere are also `$major` and `$major.$minor` tags pointing to the latest matching version (i.e. tag `1` always points to the latest `1.x` version, and tag `1.1` — to the latest `1.1.x` version).\n\nTo learn more the inputs / outpus look at the comprehensive test suit: [`main.test.ts`](__tests__/main.test.ts).\n\nTo see this action… in action check its integration test: [`default.yml`](.github/workflows/default.yml).\n\nSee how this action uses itself to check if a PR to the `main` branch increments the version: [`pr_main.yml`](.github/workflows/pr_main.yml).\n","funding_links":["https://github.com/sponsors/madhead"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadhead%2Fsemver-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadhead%2Fsemver-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadhead%2Fsemver-utils/lists"}