This is meant to be used as a composite action step when developing Visual Studio Extensions using the pattern in the VSIX Community cookbooks/samples.
When you have your GitHub Action workflow for your VSIX extension you can add this composite action:
on: [push]
jobs:
build:
name: Build
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- name: Setup .NET build dependencies
uses: timheuer/bootstrap-dotnet@v1
- name: Increment VSIX version
id: vsix_version
uses: timheuer/vsix-version-stamp@v2
with:
manifest-file: src\YourProjectLocation\source.extension.vsixmanifest
vsix-token-source-file: src\YourProjectLocation\source.extension.csThis will automatically increment the build portion (Major.Minor.Build) with the GitHub Actions run number. Using the version-number parameter you can set a specific version number instead of incrementing the current one.
You can also now (as of v2.2) set the version explicitly yourself. Doing so would look like:
- name: Increment VSIX version
id: vsix_version
uses: timheuer/vsix-version-stamp@v2
with:
version-number: '13.2.1'
manifest-file: src\YourProjectLocation\source.extension.vsixmanifest
vsix-token-source-file: src\YourProjectLocation\source.extension.cs