{"repo":"onyxmueller/build-tag-number","free":true,"listed":false,"github":"https://github.com/onyxmueller/build-tag-number","clone":"git clone https://github.com/onyxmueller/build-tag-number.git","description":"Sequential build numbers for GitHub Actions workflows, stored as a Git tag - no extra commits.","language":"JavaScript","stars":56,"topics":["automation","build-number","ci-cd","github-action","github-actions","javascript-action","versioning"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"Build Tag Number Action GitHub action for generating sequential build numbers based on Git tag. The build number is stored in your GitHub repository as a ref, it doesn't add any extra commits to your repository. Use in your workflow like so: After that runs the subsequent steps in your job will have the environment variable BUILD NUMBER available. If you prefer to be more explicit you can use the output of the step, like so: The GITHUB TOKEN environment variable is defined by GitHub for you. See virtual environments for GitHub actions for more information. Getting the build number in other jobs For other steps in the same job, you can use the methods above, to get the build number in other jobs you need to use job outputs mechanism: Setting the initial build number. If you're moving from another build system, you might want to start from some specific number. The build-number action simply uses a special tag name to store the build number, build-number-x , so you can just create and push a tag with the number you want to start on. E.g. do and then your next build number will be 501. The action will always delete older refs that start with build-number- , e.g. when it runs and finds build-number-500 it will create a new tag, build-number-501 and then delete build-number-500 . Generating multiple independent build numbers Sometimes you may have more than one project to build in one repository. For example, you may have a client and a server in the same GitHub repository that yo","default_branch":null,"files":null,"tree":[],"storefront":"/r/onyxmueller","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/onyxmueller/build-tag-number/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}