{"id":15203034,"url":"https://github.com/chrschu90/gittagsemanticversion","last_synced_at":"2026-03-07T07:32:25.231Z","repository":{"id":166393829,"uuid":"638643986","full_name":"ChrSchu90/GitTagSemanticVersion","owner":"ChrSchu90","description":"GitHub action to get version information from the Git tag","archived":false,"fork":false,"pushed_at":"2023-06-14T21:30:10.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T19:02:19.935Z","etag":null,"topics":["action","continuous-deployment","continuous-integration","github-actions","mit-license","powershell","publishing","versioning"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/ChrSchu90.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":"2023-05-09T19:43:25.000Z","updated_at":"2024-08-09T08:47:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7d805d7-44bc-4539-926e-b8c214a8adba","html_url":"https://github.com/ChrSchu90/GitTagSemanticVersion","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrSchu90%2FGitTagSemanticVersion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrSchu90%2FGitTagSemanticVersion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrSchu90%2FGitTagSemanticVersion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrSchu90%2FGitTagSemanticVersion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChrSchu90","download_url":"https://codeload.github.com/ChrSchu90/GitTagSemanticVersion/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242005290,"owners_count":20056426,"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":["action","continuous-deployment","continuous-integration","github-actions","mit-license","powershell","publishing","versioning"],"created_at":"2024-09-28T04:22:46.480Z","updated_at":"2026-03-07T07:32:25.191Z","avatar_url":"https://github.com/ChrSchu90.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Tag Semantic Version\nGitHub action to get version information from the Git tag.\n\nThe tag reqires a \"v\" as prefix followed by a [Semantic Version 2.0.0](https://semver.org/). You can [test your tag](https://regex101.com/r/rEi5ZC/2) for validation.\n## Formats:\n- *v[Major].[Minor].[Patch]\n- *v[Major].[Minor].[Patch]-[pre-release]\n- *v[Major].[Minor].[Patch]+[buildmetadata]\n- *v[Major].[Minor].[Patch]-[pre-release]+[buildmetadata]\n\n## Example\n```yml\nname: Example\n\non:\n  push:\n    tags:\n      - 'v*'\n\njobs:\n  build:\n    name: Build\n    runs-on: ubuntu-latest\n    steps:\n    - name: Checkout\n      uses: actions/checkout@v3\n    - name: Setup .NET\n      uses: actions/setup-dotnet@v3\n      with:\n        dotnet-version: 6.0.x\n    - name: Restore\n      run: dotnet restore\n    - name: Build\n      run: dotnet build --no-restore\n    - name: Test\n      run: dotnet test --no-restore --no-build\n    - name: Get Version from Tag\n      if: startsWith(github.event.ref, 'refs/tags/v')\n      id: tagver\n      uses: ChrSchu90/GitTagSemanticVersion@v1.1\n    - name: Pack Release NuGets\n      if: ${{ steps.tagver.outputs.is_release == 'true' }}\n      run: dotnet pack --no-restore --output ${{ github.workspace }}/packages /p:Version=${{ steps.tagver.outputs.version }}\n    - name: Pack Prerelease NuGets\n      if: ${{ steps.tagver.outputs.is_prerelease == 'true' }}\n      run: dotnet pack --no-restore --output ${{ github.workspace }}/packages /p:VersionPrefix=${{ steps.tagver.outputs.version }} --version-suffix ${{ steps.tagver.outputs.suffix }}\n    - name: Push NuGets\n      if: ${{ steps.tagver.outputs.is_valid == 'true' }}\n      run: dotnet nuget push ${{ github.workspace }}/packages/*.nupkg --source ${{ secrets.NUGET_FEED }} --skip-duplicate --api-key ${{ secrets.NUGET_API_KEY }}\n```\n\n## Inputs\n\n| Name         | Type   | Description                                                                         |\n| ------------ | ------ | ----------------------------------------------------------------------------------- |\n| `tag`        | String | [optional] Tag where the version info gets extracted from. Default is `github.ref`  |\n\n## Outputs\n\nThe following outputs can be accessed via `${{ steps.\u003cstep-id\u003e.outputs }}`. \nNote that boolean output variables needs to be handled like strings, otherwise it could lead into unexpected behaviors!\n\n| Name            | Type   | Description                                                                   |\n| --------------- | ------ | ----------------------------------------------------------------------------- |\n| `version_tag`   | String | The clean version tag (e.g. v1.2.3-beta1+as4at5dd) without the git ref prefix |\n| `version`       | String | Version without pre-release or build metadata (e.g. 1.2.3)                    |\n| `major`         | String | Major version number (e.g. 1)                                                 |\n| `minor`         | String | Minor version number (e.g. 2)                                                 |\n| `patch`         | String | Patch version number (e.g. 3)                                                 |\n| `suffix`        | String | Pre-release tag without `-` (e.g. beta1)                                      |\n| `metadata`      | String | Metadata tag without `+` (e.g. as4at5dd)                                      |\n| `package`       | String | Package version for NuGet with suffix if defined (e.g. 1.2.3-beta1)           |\n| `is_valid`      | String | `true` if the version tag was valid and could be processed, otherwise `false` |\n| `is_prerelease` | String | `true` if the version is a pre-release (suffix defined), otherwise `false`    |\n| `is_release`    | String | `true` if the version is a release (no suffix defined), otherwise `false`     |\n\n## Notes\n- This action requires `pwsh` to actually be available and on PATH of the runner - which\n  is the case for all GitHub-provided runner VMs; for your own runners you need to take care of that yourself.\n- This action is a [`composite` action](https://docs.github.com/en/actions/creating-actions/creating-a-composite-run-steps-action).\n\n## License\nThis action is licensed under [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrschu90%2Fgittagsemanticversion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrschu90%2Fgittagsemanticversion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrschu90%2Fgittagsemanticversion/lists"}