{"id":18952278,"url":"https://github.com/step-security/semver-utils","last_synced_at":"2025-10-19T11:32:56.325Z","repository":{"id":210515247,"uuid":"726749706","full_name":"step-security/semver-utils","owner":"step-security","description":"One-stop shop for working with semantic versions in your GitHub Actions workflows","archived":false,"fork":false,"pushed_at":"2025-02-20T06:21:22.000Z","size":869,"stargazers_count":0,"open_issues_count":9,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-20T07:21:46.948Z","etag":null,"topics":["step-security-maintained-actions"],"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/step-security.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-03T09:32:43.000Z","updated_at":"2025-02-20T06:21:26.000Z","dependencies_parsed_at":"2024-04-17T16:28:06.601Z","dependency_job_id":"4d21a201-46b2-4cc1-84e3-519bb97b04ca","html_url":"https://github.com/step-security/semver-utils","commit_stats":null,"previous_names":["step-security/semver-utils"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Fsemver-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Fsemver-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Fsemver-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Fsemver-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/step-security","download_url":"https://codeload.github.com/step-security/semver-utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239951607,"owners_count":19723909,"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":["step-security-maintained-actions"],"created_at":"2024-11-08T13:32:33.710Z","updated_at":"2025-10-19T11:32:51.283Z","avatar_url":"https://github.com/step-security.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StepSecurity Maintained semver-utils Action\n\nForked from: [madhead/semver-utils](https://github.com/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: step-security/semver-utils@v4\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: step-security/semver-utils@v4\n  id: lenient\n  with:\n    version: invalid\n- run: |\n    echo \"${{ steps.lenient.outputs.release }}\"           # (empty string)\n\n- uses: step-security/semver-utils@v4\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/step-security/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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstep-security%2Fsemver-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstep-security%2Fsemver-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstep-security%2Fsemver-utils/lists"}