{"id":26095318,"url":"https://github.com/thenativeweb/get-next-version","last_synced_at":"2025-04-12T10:07:38.252Z","repository":{"id":46757936,"uuid":"494370534","full_name":"thenativeweb/get-next-version","owner":"thenativeweb","description":"get-next-version gets the next version for your repository according to semantic versioning based on conventional commits.","archived":false,"fork":false,"pushed_at":"2024-05-28T20:14:26.000Z","size":161,"stargazers_count":61,"open_issues_count":1,"forks_count":9,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-05-29T11:15:15.563Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/thenativeweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-20T07:47:42.000Z","updated_at":"2024-06-17T13:08:59.277Z","dependencies_parsed_at":"2023-02-08T08:15:23.598Z","dependency_job_id":"e0e7e7fe-2459-4457-a824-bdc797c01049","html_url":"https://github.com/thenativeweb/get-next-version","commit_stats":{"total_commits":98,"total_committers":11,"mean_commits":8.909090909090908,"dds":0.5306122448979591,"last_synced_commit":"658edee02d0835a7243a7dd8a1dc23cb2d9d0c2c"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thenativeweb%2Fget-next-version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thenativeweb%2Fget-next-version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thenativeweb%2Fget-next-version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thenativeweb%2Fget-next-version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thenativeweb","download_url":"https://codeload.github.com/thenativeweb/get-next-version/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248537194,"owners_count":21120711,"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":"2025-03-09T13:15:41.108Z","updated_at":"2025-04-12T10:07:38.234Z","avatar_url":"https://github.com/thenativeweb.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# get-next-version\n\nget-next-version gets the next version for your repository according to semantic versioning based on [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#specification).\n\n## Installation\n\nGo to the [releases page](https://github.com/thenativeweb/get-next-version/releases), find the download url for your architecture and operating system, and copy it.\n\nThen, run the following steps:\n\n```shell\n# Download the latest release (insert the url here)\n$ curl -L -o get-next-version \u003cURL\u003e\n\n# Ensure the binary is executable\n$ chmod a+x get-next-version\n\n# Move the binary to the application directory\n$ sudo mv get-next-version /usr/local/bin\n```\n\n## Quick Start\n\nGo to the repository and run `get-next-version`. The tool will analyze the history of your repository and output the next version for your release.\n\n```shell\n$ get-next-version\n```\n\nOptionally, you may hand over the `--repository` (or short `-r`) flag to specify the path to the repository you want to analyze, if it is not in the current working directory.\n\n```shell\n$ get-next-version --repository \u003cPATH\u003e\n```\n\nIf you need to prefix the version, you can use the `--prefix` (or short `-p`) flag. Note that the prefix must be a valid tag name on its own.\n\nBy default, output will be printed to the console in a human-readable format. If you want to print the output in a machine-readable format, you can use the `--target` (or short `-t`) flag:\n\n```shell\n# Print output in JSON format\n$ get-next-version --target json\n\n# Write output to the GITHUB_OUTPUT file in GitHub Action format (see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter)\n$ get-next-version --target github-action\n```\n\n## Using the GitHub Action\n\nFor convenience, you may use the GitHub Action when running `get-next-version` inside a workflow on GitHub.\n\n**⚠️ When cloning the repository, make sure to set the `fetch-depth` option to `0`, otherwise `get-next-version` will not be able to analyze the history of the repository!**\n\n**⚠️ The action uses the parameter `target=github-action` by default, which will not print any human-readable output, but only write the output to the GITHUB_OUTPUT file.**\n\nAn example workflow that makes use of the GitHub Action is shown below:\n\n```yaml\nname: Example workflow\n\non: pull_request\n\njobs:\n  example:\n    name: Example\n    runs-on: ubuntu-latest\n\n    steps:\n    - name: Clone repository\n      uses: actions/checkout@v3\n      with:\n        fetch-depth: 0\n        ref: ${{ github.event.pull_request.head.sha }}\n    - name: Get next version\n      id: get_next_version\n      uses: thenativeweb/get-next-version@main\n      with:\n        prefix: 'v' # optional, defaults to ''\n    - name: Show the next version\n      run: |\n        echo ${{ steps.get_next_version.outputs.version }}\n        echo ${{ steps.get_next_version.outputs.hasNextVersion }}\n```\n\n## Using commit messages\n\nIn case you are not familiar with conventional commits (as mentioned above), here is a short summary. Basically, you should prefix your commit messages with one of the following keywords:\n\n- `chore` – used for maintenance, does not result in a new version\n- `fix` – used for bug fixes, results in a new patch version (e.g. from `1.2.3` to `1.2.4`)\n- `feat` – used for introducing new features, results in a new minor version (e.g. from `1.2.3` to `1.3.0`)\n- `feat!` – used for breaking changes, results in a new major version (e.g. from `1.2.3` to `2.0.0`)\n\nSome examples for commit messages are shown below:\n\n- `chore: Initial commit`\n- `fix: Correct typo`\n- `feat: Add support for Node.js 18`\n- `feat!: Change API from v1 to v2`\n\nPlease note that `!` indicates breaking changes, and will always result in a new major version, independent of the type of change.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthenativeweb%2Fget-next-version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthenativeweb%2Fget-next-version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthenativeweb%2Fget-next-version/lists"}