GitHub Actions that allow the setup and use of the GitVersion and GitReleaseManager tools.
Examples for usage of GitVersion:
Examples for usage of GitReleaseManager:
Actions v5 supports GitVersion 7.0.x. Use Actions v4 for GitVersion 6. See the v5 migration guide for changed arguments, configuration, outputs and platform requirements.
You can find the compatibility matrix in the versions.md file.
- Linux - Recommended to build and run
- Node.js - Latest LTS version recommended
- .NET SDK - Version 10.0 or later required for GitVersion 7 with Actions v5; see the tool-specific requirements for GitReleaseManager
- Git - Latest version recommended
This project is designed to be run and worked on in a Linux or macOS environment. If developing on Windows, please consider using WSL as it's likely you will run into issues with file paths etc
-
Clone the repository:
git clone https://github.com/GitTools/actions.git cd actions -
Install dependencies:
npm install
-
Build the project:
- Build everything:
npm run build - Build tool bundles only:
npm run build:tools - Build all agent bundles:
npm run build:agents - Build a single agent bundle:
npm run build:agent:local,npm run build:agent:azure, ornpm run build:agent:github
- Build everything:
-
Test the project:
npm run testUseful scoped commands:
npm run test:tools npm run test:agents npx vitest --run src/__tests__/tools/gitversion/runner.spec.ts --config src/__tests__/vitest.config.ts
-
Check code quality:
npm run lint:check npm run typecheck npm run format:check npm run mdlint:check
-
Run a built tool locally:
npm run run:local:gitversion -- --command execute
This repository commits generated .mjs bundles in dist/ and the repo-root action folders because those are the published artifacts. After changing src/, run npm run build and include the generated output in your commit. Do not edit generated .mjs files by hand.
- TypeScript/JavaScript - Primary development languages
- GitHub Actions - Understanding of action creation and workflows
- Azure Pipelines - Familiarity with pipeline tasks and extensions
- .NET Tools - Basic understanding of .NET CLI tools
- Git - Strong knowledge of Git versioning and release management
src/tools/- Core implementation of GitVersion and GitReleaseManager integrationssrc/agents/- Build agent implementations for different CI platformssrc/__tests__/- Test suites organized by componentdocs/examples/- Usage examples for both GitHub Actions and Azure Pipelines
When contributing to this project, please follow these guidelines for creating pull requests:
-
Fork and Clone
- Fork the repository to your GitHub account
- Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/actions.git - Add upstream remote:
git remote add upstream https://github.com/GitTools/actions.git
-
Create a Feature Branch
- Create a branch from main:
git checkout -b feature/your-feature-name - Use descriptive branch names (e.g.,
feature/add-new-version-format,fix/issue-123)
- Create a branch from main:
-
Keep Your Branch Updated
-
Fetch upstream changes:
git fetch upstream -
Rebase your branch on upstream main:
git checkout main git rebase upstream/main git checkout your-branch git rebase main
-
Always use rebase instead of merge to maintain a clean history
-
-
Make Your Changes
- Make commits with clear, descriptive messages
- Follow the project's code style and conventions
- Add tests for new features or bug fixes
- Run tests locally to ensure everything passes
-
Submit the Pull Request
- Push your changes to your fork:
git push origin your-branch - Go to the original repository on GitHub
- Click "New Pull Request" and select your feature branch
- Link any related issues
- Push your changes to your fork:
-
PR Guidelines
- Keep PRs focused and single-purpose
- Include tests and documentation updates
- Ensure CI checks pass
-
After PR is Merged
- Delete your feature branch locally and remotely
- Update your main branch with the upstream changes