Skip to content

Latest commit

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

berglie/assembly-version

This repository contains two actions; set-buildnumber for setting the assembly build number and get for getting the assembly version from a specified file.

berglie/assembly-version/set-buildnumber

This action will help replace the build number in the assembly info file (which is included in most .Net projects) with github.run_number or a custom number.

Use this action before a build job to include the build number in the assembly version.

Note: It will also work for any other files that can be opened as a text file and contains the version in the format: major.minor.patch.build

The version is returned from the action output in format major.minor.patch.build.

For example: 1.0.0.0.

Use ${{steps.step-id-here.outputs.version}} to get the version number in a GitHub workflow. Remember to set the id on the step.

Example Usage

Automatically replace all AssemblyInfo.cs files with buildnumber github.run_number

- name: Set build numberuses: berglie/assembly-version/set-buildnumber@v1

Optional Parameters

- name: Set build numberid: setversionuses: berglie/assembly-version/set-buildnumber@v1with:
filename: 'SharedAssemblyInfo.cs'directory: './src/'buildnumber: ${{ env.RELEASE_VERSION }} recursive: false

berglie/assembly-version/get

This action will help get the file version from the properties of a specified file. If the version of the file is not found, it will try to read the file as a text file and locate the version as a string, such as in 'AssemblyInfo.cs'

The version is returned from the action output in format major.minor.patch.build.

For example: 1.0.0.0.

Use ${{steps.step-id-here.outputs.version}} to get the version number in a GitHub workflow. Remember to set the id on the step.

Example Usage

 - name: Get Assembly Versionuses: berglie/assembly-version/get@v1with:
filename: 'MyLibrary.dll'

Optional Parameters

 - name: Get Assembly Versionid: getversionuses: berglie/assembly-version/get@v1with:
filename: 'MyExecutable.exe'directory: './src/'

About

GitHub actions to set and get assembly versions from GitHub workflows.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages