Skip to content
trending-up

GitHub Action

get-net-sdk-project-versions-action

v2.0.0 Latest version

get-net-sdk-project-versions-action

trending-up

get-net-sdk-project-versions-action

get .NET SDK project version from csproj/vbproj.

Installation

Copy and paste the following snippet into your .yml file.

              

- name: get-net-sdk-project-versions-action

uses: kzrnm/[email protected]

Learn more about this action in kzrnm/get-net-sdk-project-versions-action

Choose a version

Get .NET SDK Project Versions

This action gets versions from csproj/vbproj.

test

Input

proj-path

Required csproj/vbproj path.

出力

version

<Version>

version-prefix

<VersionPrefix>

version-suffix

<VersionSuffix>

package-version

<PackageVersion>

assembly-version

<AssemblyVersion>

file-version

<FileVersion>

informational-version

<InformationalVersion>

Usage

      - uses: kzrnm/get-net-sdk-project-versions-action@v1
        id: get-version
        with:
          proj-path: YourProject/YourProject.csproj
      - run: echo "${{steps.get-version.outputs.version}}"
      - run: echo "${{steps.get-version.outputs.version-prefix}}" 
      - run: echo "${{steps.get-version.outputs.version-suffix}}" 
      - run: echo "${{steps.get-version.outputs.package-version}}" 
      - run: echo "${{steps.get-version.outputs.assembly-version}}" 
      - run: echo "${{steps.get-version.outputs.file-version}}" 
      - run: echo "${{steps.get-version.outputs.informational-version}}" 

Reference