Skip to content

codebeltnet/dotnet-build

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.NET Build from Codebelt

Uses the .NET CLI dotnet build command that builds specified projects or the solution itself including all of its dependencies.

Supports projects input we learned to appreciate from AzDO DotNetCoreCLI.

This action is part of the Codebelt umbrella and ensures a consistent way of:

  • Defining your CI/CD pipeline
  • Structuring your repository
  • Keeping your codebase small and feasible
  • Writing clean and maintainable code
  • Deploying your code to different environments
  • Automating as much as possible

A paved path to excel as a DevSecOps Engineer.

Usage

To use this action in your GitHub repository, you can follow these steps:

uses: codebeltnet/dotnet-build@v4

Inputs

with:
  # Optional path to the project(s) file to restore. Pass empty to have MSBuild use the default behavior.
  # Supports globbing. Default is an empty string.
  projects: ''
  # Defines the build configuration.
  configuration: 'Debug'
  # Compiles for a specific framework. The framework must be defined in the project file. Default is an empty string.
  framework: ''
  # Sets the verbosity level of the command.
  # Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]. 
  # The default is quiet.
  verbosity-level: 'quiet'
  # Provides a way to fully customize the build. See https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-command-line-reference?view=vs-2022#switches for more information.
  build-switches: ''

Outputs

This action has no outputs.

Reusable Workflow

A complementary jobs-dotnet-build reusable workflow is available, allowing you to fully leverage the Codebelt experience in your GitHub Actions pipeline.

Examples

Build for Release in src folder and upload build artifact

- name: Build for Release
  uses: codebeltnet/dotnet-build@v4
  with:
    configuration: Release

Build for Debug in src folder

- name: Build for Debug
  uses: codebeltnet/dotnet-build@v4
  with:
    configuration: Debug

Caller workflows to showcase the Codebelt experience

Basic CI/CD Pipeline

Intermediate CI/CD Pipeline

Advanced CI/CD Pipeline

Contributing to .NET Build from Codebelt

Contributions are welcome! Feel free to submit issues, feature requests, or pull requests to help improve this action.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Tip

To learn more about the Codebelt experience and offerings, visit our organization page on GitHub.

About

An opinionated GitHub Action for building projects and their dependencies as part of your CI flow.

Topics

Resources

License

Stars

Watchers

Forks