This GitHub action sets version information in Visual Studio SDK projects
See action.yml
Apply all version values to all SDK projects found:
- name: Update project version
uses: roryprimrose/set-vs-sdk-project-version@v1
with:
version: ${{ MyVersion }}
assemblyVersion: ${{ MyAssemblySemVer }}
fileVersion: ${{ MyMajorMinorPatch }}
informationalVersion: ${{ MyInformationalVersion }} Only defining the Version value:
- name: Update project version
uses: roryprimrose/set-vs-sdk-project-version@v1
with:
version: ${{ MyVersion }}Filtering particular projects
- name: Update project version
uses: roryprimrose/set-vs-sdk-project-version@v1
with:
projectFilter: '*.csproj'
version: ${{ MyVersion }}
assemblyVersion: ${{ MyAssemblySemVer }}
fileVersion: ${{ MyMajorMinorPatch }}
informationalVersion: ${{ MyInformationalVersion }} steps:
- name: Checkout
uses: actions/checkout@v1
- name: Fetch tags and master for GitVersion
run: |
git fetch --tags
git branch --create-reflog master origin/master
- name: GitVersion
id: gitversion # step id used as reference for output values
uses: roryprimrose/rungitversion@v1
- name: Update project version
uses: roryprimrose/set-vs-sdk-project-version@v1
with:
version: ${{ steps.gitversion.outputs.NuGetVersionV2 }}
assemblyVersion: ${{ steps.gitversion.outputs.AssemblySemVer }}
fileVersion: ${{ steps.gitversion.outputs.MajorMinorPatch }}
informationalVersion: ${{ steps.gitversion.outputs.InformationalVersion }}
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.0.100' # SDK Version to use.- Updated to use JavaScript to run the action
- Updated to use Dockerfile to run the action
- Initial release
The scripts and documentation in this project are released under the MIT License
Clone this repo
git clone https://github.com/roryprimrose/set-vs-sdk-project-version.git
Run the action
npm run action