GitHub Action to get MSBuild project (e.g. .csproj) version from the project file.
file
- path to the project file (string, required)validate-all
- validate all version parts (boolean, optional, default: false)validate-version-prefix
- validate version prefix (boolean, optional, default: false)validate-version-suffix
- validate version suffix (boolean, optional, default: false)validate-version
- validate version (boolean, optional, default: false)validate-assembly-version
- validate assembly version (boolean, optional, default: false)validate-file-version
- validate file version (boolean, optional, default: false)validate-package-version
- validate package version (boolean, optional, default: false)
version-prefix
- version prefix (string)version-suffix
- version suffix (string)version
- version (string)assembly-version
- assembly version (string)file-version
- file version (string)informational-version
- informational version (string)package-version
- package version (string)
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get MSBuild project version
uses: dae-ne/get-msbuild-project-version@v2
id: project-version
with:
file: 'path/to/your/project.csproj'
validate-all: true
- run: echo ${{ steps.project-version.outputs.version }}
This project is licensed under the MIT license.