{"id":16611245,"url":"https://github.com/gandarez/semver-action","last_synced_at":"2026-03-13T02:13:58.269Z","repository":{"id":65159863,"uuid":"367182728","full_name":"gandarez/semver-action","owner":"gandarez","description":"Generate a semantic version","archived":false,"fork":false,"pushed_at":"2024-10-23T01:05:38.000Z","size":63,"stargazers_count":10,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-14T17:06:16.853Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/gandarez.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":"2021-05-13T21:50:53.000Z","updated_at":"2025-09-09T14:01:29.000Z","dependencies_parsed_at":"2024-06-21T02:11:00.831Z","dependency_job_id":"ecae83a4-aab7-4c58-b89e-1d726b6cb0b2","html_url":"https://github.com/gandarez/semver-action","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.25,"last_synced_commit":"b1588211654f16a6e55d534cc757b70fcc6bcb07"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/gandarez/semver-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gandarez%2Fsemver-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gandarez%2Fsemver-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gandarez%2Fsemver-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gandarez%2Fsemver-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gandarez","download_url":"https://codeload.github.com/gandarez/semver-action/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gandarez%2Fsemver-action/sbom","scorecard":{"id":418117,"data":{"date":"2025-08-11","repo":{"name":"github.com/gandarez/semver-action","commit":"3923a261735a688f293080048731493093f354ab"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/18 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/on_push.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/on_push.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/gandarez/semver-action/on_push.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/on_push.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/gandarez/semver-action/on_push.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating golang:1.21-alpine to golang:1.21-alpine@sha256:2414035b086e3c42b99654c8b26e6f5b1b1598080d65fd03c7f499552ff4dc94","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0603 / GHSA-hp87-p4gw-j4gq"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T00:26:41.697Z","repository_id":65159863,"created_at":"2025-08-19T00:26:41.697Z","updated_at":"2025-08-19T00:26:41.697Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30455301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T21:31:01.033Z","status":"online","status_checked_at":"2026-03-13T02:00:07.565Z","response_time":60,"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":[],"created_at":"2024-10-12T01:36:15.716Z","updated_at":"2026-03-13T02:13:58.244Z","avatar_url":"https://github.com/gandarez.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Semantic Versioning Action\n\nThis action calculates the next version relying on semantic versioning. It uses the branching name and branching model to calculate the next version.\n\n## Strategies\n\nIf `auto` bump, it will try to extract the closest tag and calculate the next semantic version. If not, it will bump respecting the value passed.\n\n### Branching Models\n\nIt supports the following branching models:\n\n- [Gitflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow)\n- [Trunk Based Development](https://trunkbaseddevelopment.com/)\n\n### Branch Names\n\nThese are the the default prefixes when `auto` bump:\n\n- `(?i)^(.+:)?(bugfix/.+)` or `(?i)^(.+:)?(hotfix/.+)` - `patch`\n- `(?i)^(.+:)?(feature/.+)` - `minor`\n- `(?i)^(.+:)?(release/.+)` - `major`\n- `(?i)^(.+:)?((doc(s)?|misc)/.+)` - `build`\n\n### Scenarios\n\n#### Gitflow\n\n- Not a valid source branch prefix - Increments build version.\n\n    ```text\n    v0.1.0 results in v0.1.0-pre.1\n    v1.5.3-pre.2 results in v1.5.3-pre.3\n    ```\n\n- Source branch is prefixed with `bugfix/` and dest branch is `develop` - Increments patch version.\n\n    ```text\n    v0.1.0 results in v0.1.1-pre.1\n    v1.5.3-pre.2 results in v1.5.4-pre.1\n    ```\n\n- Source branch is prefixed with `feature/` and dest branch is `develop` - Increments minor version.\n\n    ```text\n    v0.1.0 results in v0.2.0-pre.1\n    v1.5.3-pre.2 results in v1.6.0-pre.1\n    ```\n\n- Source branch is prefixed with `release/` and dest branch is `develop` - Increments major version.\n\n    ```text\n    v0.1.0 results in v1.0.0-pre.1\n    v1.5.3-pre.2 results in v2.0.0-pre.1\n    ```\n\n- Source branch is prefixed with `doc/` or `misc/` and dest branch is `develop` - Increments build version.\n\n    ```text\n    v0.1.0 results in v0.1.0-pre.1\n    v1.5.3-pre.2 results in v1.5.3-pre.3\n    ```\n\n- Source branch is prefixed with `hotfix/` and dest branch is `master` - Increments patch version.\n\n    ```text\n    v0.1.0 results in v0.1.1-pre.1\n    ```\n\n- Source branch is `develop` and dest branch is `master` - Takes the closest tag and finalize it.\n\n    ```text\n    v1.5.3-pre.2 results in v1.5.3\n    ```\n\n#### Trunk-based\n\n- Not a valid source branch prefix - Increments build version.\n\n    ```text\n    v0.1.0 results in v0.1.0+1\n    ```\n\n- Source branch is prefixed with `bugfix/` and dest branch is `master` - Increments patch version.\n\n    ```text\n    v0.1.0 results in v0.1.1\n    ```\n\n- Source branch is prefixed with `feature/` and dest branch is `master` - Increments minor version.\n\n    ```text\n    v0.1.0 results in v0.2.0\n    ```\n\n- Source branch is prefixed with `release/` and dest branch is `master` - Increments major version.\n\n    ```text\n    v0.1.0 results in v1.0.0\n    ```\n\n- Source branch is prefixed with `doc/` or `misc/` and dest branch is `master` - Increments build version.\n\n    ```text\n    v0.1.0 results in v0.1.0+1\n    ```\n\n## Github Environment Variables\n\nHere are the environment variables it takes from Github Actions so far:\n\n- `GITHUB_SHA`\n\n## Example usage\n\n### Gitflow basic\n\nUses `auto` bump strategy to calculate the next semantic version.\n\n```yaml\n- id: semver-tag\n  uses: gandarez/semver-action@master\n  with:\n    branching_model: \"git-flow\"\n- name: \"Created tag\"\n  run: echo \"tag ${{ steps.semver-tag.outputs.semver_tag }}\"\n```\n\n### Gitflow custom\n\n```yaml\n- id: semver-tag\n  uses: gandarez/semver-action@master\n  with:\n    branching_model: \"git-flow\"\n    prefix: \"ver\"\n    prerelease_id: \"alpha\"\n    main_branch_name: \"main\"\n    develop_branch_name: \"dev\"\n    patch_pattern: \"^fix/.+\"\n    minor_pattern: \"^feat/.+\"\n    major_pattern: \"^major/.+\"\n    build_pattern: \"^build/.+\"\n    hotfix_pattern: \"^hotfix/.+\"\n    exclude_pattern: \"^ignore/.+\"\n- name: \"Created tag\"\n  run: echo \"tag ${{ steps.semver-tag.outputs.semver_tag }}\"\n```\n\n### Trunk-based basic\n\nUses `auto` bump strategy to calculate the next semantic version.\n\n```yaml\n- id: semver-tag\n  uses: gandarez/semver-action@master\n  with:\n    branching_model: \"trunk-based\"\n- name: \"Created tag\"\n  run: echo \"tag ${{ steps.semver-tag.outputs.semver_tag }}\"\n```\n\n### Trunk-based custom\n\n```yaml\n- id: semver-tag\n  uses: gandarez/semver-action@master\n  with:\n    branching_model: \"trunk-based\"\n    prefix: \"ver\"\n    main_branch_name: \"main\"\n    patch_pattern: \"^fix/.+\"\n    minor_pattern: \"^feat/.+\"\n    major_pattern: \"^major/.+\"\n    build_pattern: \"^build/.+\"\n    exclude_pattern: \"^ignore/.+\"\n- name: \"Created tag\"\n  run: echo \"tag ${{ steps.semver-tag.outputs.semver_tag }}\"\n```\n\n## Inputs\n\n| parameter | required | description | default |\n| --- | --- | --- | --- |\n| bump | false | Bump strategy for semantic versioning. Can be `auto`, `major`, `minor`, `patch`. | auto |\n| base_version | false | Version to use as base for the generation, skips version bumps. | |\n| prefix | false | Prefix used to prepend the final version.| v |\n| branching_model | false | Branching model to use. Can be `git-flow` or `trunk-based`. | git-flow |\n| prerelease_id | false | Text representing the prerelease identifier. | pre |\n| main_branch_name | false | The main branch name. | master |\n| develop_branch_name | false | The develop branch name. | develop |\n| patch_pattern | false | Patch pattern to match branch name for patch increment. | (?i)^(.+:)?(bugfix/.+) |\n| minor_pattern | false | Minor pattern to match branch name for minor increment. | (?i)^(.+:)?(feature/.+) |\n| major_pattern | false | Major pattern to match branch name for major increment. | (?i)^(.+:)?(release/.+) |\n| build_pattern | false | Build pattern to match branch name for build increment. | (?i)^(.+:)?((doc(s)?|misc)/.+) |\n| hotfix_pattern | false | Hotfix pattern to match branch name for patch increment. | (?i)^(.+:)?(hotfix/.+) |\n| exclude_pattern | false | Pattern to exclude branches from semantic versioning. | |\n| repo_dir | false | The repository path. | current dir |\n| debug | false | Enable debug mode. | false |\n\n## Outputs\n\n| parameter     | description |\n| ---           | --- |\n| semver_tag    | The calculdated semantic version. |\n| is_prerelease | True if calculated tag is pre-release. For trunk-based model it is always `false`. |\n| previous_tag  | The tag used to calculate next semantic version. |\n| ancestor_tag  | The ancestor tag based on specific pattern. For trunk-based model it is always empty .|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgandarez%2Fsemver-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgandarez%2Fsemver-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgandarez%2Fsemver-action/lists"}