{"id":16981992,"url":"https://github.com/valadas/get-release-branch-version","last_synced_at":"2025-04-15T02:42:52.351Z","repository":{"id":65155764,"uuid":"261648907","full_name":"valadas/get-release-branch-version","owner":"valadas","description":"Gets the version number of a release branch such as release/1.2.3","archived":false,"fork":false,"pushed_at":"2023-10-16T17:28:58.000Z","size":1075,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T03:37:56.652Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/valadas.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}},"created_at":"2020-05-06T04:09:03.000Z","updated_at":"2023-10-11T21:17:54.000Z","dependencies_parsed_at":"2023-01-04T12:32:41.980Z","dependency_job_id":null,"html_url":"https://github.com/valadas/get-release-branch-version","commit_stats":{"total_commits":22,"total_committers":1,"mean_commits":22.0,"dds":0.0,"last_synced_commit":"2914201bd2a3472c1dae5e8d7e4b9da6e5221ae4"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valadas%2Fget-release-branch-version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valadas%2Fget-release-branch-version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valadas%2Fget-release-branch-version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valadas%2Fget-release-branch-version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valadas","download_url":"https://codeload.github.com/valadas/get-release-branch-version/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248997049,"owners_count":21195785,"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":[],"created_at":"2024-10-14T02:07:02.512Z","updated_at":"2025-04-15T02:42:52.332Z","avatar_url":"https://github.com/valadas.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# get-release-branch-version\nGets the version number of a release branch such as release/1.2.3\n\nThis action should only be run on release branches. Here is a suggested usage with a check:\n\n```yaml\nname: Get release branch\non: create\n\njobs:\n  get-release:\n    name: Get the release branch version number\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n        with:\n          fetch-depth: 1\n      - uses: valadas/get-release-branch-version@v1\n        id: branchVersion\n      - name: Dump the version info\n        env:\n          MAJOR: ${{ steps.branchVersion.outputs.major }}\n          MINOR: ${{ steps.branchVersion.outputs.minor }}\n          PATCH: ${{ steps.branchVersion.outputs.patch }}\n          MANIFEST_SAFE_VERSION_STRING: ${{ steps.branchVersion.outputs.manifestSafeVersionString }}\n        run: \"echo major: $MAJOR minor: $MINOR patch: $PATCH manifestSafeVersionString: $MANIFEST_SAFE_VERSION_STRING\"\n```\n\nObviously replace the **Dump step** with something more useful for your process.\n\nIt will output the version number of the release branch:\n\nEx: Creating a **release/1.2.3** branch would output:\n\n| output                    | value    |\n|--------------------------:|---------:|\n|                    major  |        1 |\n|                    minor  |        2 |\n|                    patch  |        3 |\n| manifestSafeVersionString | 01.02.03 |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaladas%2Fget-release-branch-version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaladas%2Fget-release-branch-version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaladas%2Fget-release-branch-version/lists"}