{"id":36947964,"url":"https://github.com/sedzisz/semantic-version-action","last_synced_at":"2026-02-23T03:25:33.462Z","repository":{"id":327463899,"uuid":"1109379996","full_name":"sedzisz/semantic-version-action","owner":"sedzisz","description":"Reusable GitHub Action that generates semantic versions (MAJOR.MINOR.PATCH) from code changes, enabling consistent and automated release workflows.","archived":false,"fork":false,"pushed_at":"2025-12-12T19:25:52.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-14T09:54:32.549Z","etag":null,"topics":["action","gitea","semantic-version"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/sedzisz.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-03T18:12:28.000Z","updated_at":"2025-12-12T19:25:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sedzisz/semantic-version-action","commit_stats":null,"previous_names":["sedzisz/semantic-version"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sedzisz/semantic-version-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sedzisz%2Fsemantic-version-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sedzisz%2Fsemantic-version-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sedzisz%2Fsemantic-version-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sedzisz%2Fsemantic-version-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sedzisz","download_url":"https://codeload.github.com/sedzisz/semantic-version-action/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sedzisz%2Fsemantic-version-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28384596,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T10:34:27.190Z","status":"ssl_error","status_checked_at":"2026-01-13T10:34:26.289Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["action","gitea","semantic-version"],"created_at":"2026-01-13T11:45:03.929Z","updated_at":"2026-02-23T03:25:33.447Z","avatar_url":"https://github.com/sedzisz.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Semantic Version GitHub Action\n\nAutomatically calculate the next semantic version (`MAJOR.MINOR.PATCH`) based on commit messages, branch names, or pull-request labels.\n\n---\n\n## Features\n\n- Detects change type from commit messages, branch names, or PR labels\n- Configurable token → version bump mapping\n- Outputs: `version`, `release_needed`, `release_id`\n- Docker-based for consistency\n- **Version detection based on Git tags** (format: `v*.*.*` or `*.*.*`)\n\n---\n\n## Quick Start\n\n### Basic Usage (Recommended)\n\n```yaml\n- name: Determine version\n  id: version\n  uses: sedzisz/semantic-version-action@v1\n  with:\n    type: label  # or 'commit', 'branch'\n    map: |\n      {\n        \"major\": [\"breaking\"],\n        \"minor\": [\"feature\"],\n        \"patch\": [\"fix\", \"bug\", \"docs\"]\n      }\n\n- name: Use version\n  run: echo \"New version: ${{ steps.version.outputs.version }}\"\n```\n\n### Docker Method\n\n```yaml\n- name: Determine version\n  id: version\n  uses: docker://ghcr.io/sedzisz/semantic-version-action:latest\n  env:\n    INPUT_TYPE: label\n    INPUT_MAP: '{\"major\":[\"breaking\"],\"minor\":[\"feature\"],\"patch\":[\"fix\",\"bug\",\"docs\"]}'\n```\n\n---\n\n## Inputs \u0026 Outputs\n\n**Inputs:**\n- `type` – Detection mode: `label`, `commit`, or `branch` (default: `label`)\n- `map` – JSON mapping of tokens to bump types (required)\n\n**Outputs:**\n- `version` – e.g. `v1.4.2`\n- `release_needed` – `true` or `false`\n- `release_id` – e.g. `1.4.2`\n\n---\n\n## Versioning Logic\n\nThe action automatically determines the current version by scanning Git tags in the repository:\n- Searches for tags matching `v*.*.*` (e.g., `v1.2.3`) or `*.*.*` (e.g., `1.2.3`)\n- Uses the latest semantic version tag as the base\n- If no valid tags exist, starts from `v0.0.0`\n- Increments the appropriate version component (MAJOR, MINOR, or PATCH) based on detected changes\n\n---\n\n## Detection Modes\n\n**`label`** – Reads first PR label (e.g., `feature`, `bug`)  \n**`commit`** – Extracts from commit message: `[feature]` or `fix:`  \n**`branch`** – Extracts from branch name: `feature/login`\n\n---\n\n## Complete Example\n\n```yaml\nname: Auto Version\n\non:\n  pull_request:\n    types: [closed]\n    branches: [main]\n\njobs:\n  release:\n    if: github.event.pull_request.merged == true\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Calculate version\n        id: version\n        uses: sedzisz/semantic-version-action@v1\n        with:\n          type: label\n\n      - name: Create tag\n        if: steps.version.outputs.release_needed == 'true'\n        run: |\n          git config user.name \"github-actions[bot]\"\n          git config user.email \"github-actions[bot]@users.noreply.github.com\"\n          git tag ${{ steps.version.outputs.version }}\n          git push origin ${{ steps.version.outputs.version }}\n```\n\n---\n\n## Troubleshooting\n\n**No version generated?**  \n→ Check if token matches your `map` keys. View logs for detection messages.\n\n**Invalid JSON error?**  \n→ Use double quotes and no trailing commas. For `docker://`, use single-line JSON.\n\n**Empty outputs?**  \n→ Add `id: version` to your step. For `docker://`, use `env:` not `with:`.\n\n---\n\n## 📊 Method Comparison\n\n| Feature | `uses: repo@v1` | `uses: docker://` |\n|---------|-----------------|-------------------|\n| Syntax | `with:` ✅ | `env:` only |\n| Multi-line JSON | ✅ | ❌ |\n| Recommended | ✅ | Testing only |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsedzisz%2Fsemantic-version-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsedzisz%2Fsemantic-version-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsedzisz%2Fsemantic-version-action/lists"}