Skip to content

codebeltnet/jobs-nuget-push

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Reusable Workflows for NuGet Push

This repository contains reusable workflows for deploying NuGet packages from within your CI/CD pipeline.

These workflows 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.

Available Workflows

Usage

To call this workflow in your GitHub repository, you can follow these steps:

nuget-call:
    uses: codebeltnet/jobs-nuget-push/.github/workflows/default.yml@v2

Inputs

with:
  # The version of your project, e.g., 1.0.0.
  version:
  # When specified, the environment secret will be used, and not the secret passed from the caller workflow.
  environment:
  # Defines the build configuration. Default is Release.
  configuration: Release
  # The source to push the package to. Default is https://api.nuget.org/v3/index.json.
  source: https://api.nuget.org/v3/index.json
# The name of the downloaded build artifact. Default, when left empty, is 'format('NuGet-{0}', inputs.configuration)'.
  download-build-artifact-name:
  # Sets the verbosity level of the command. Allowed values are quiet, normal and detailed. The default is quiet.
  verbosity-level:
  # The maximum time in minutes to allow the job to run. Default is 15 minutes.
  timeout-minutes: 15

Secrets

secrets:
  NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}

Outputs

This workflow has no outputs.

Example

jobs:
  deploy:
    if: github.event_name != 'pull_request'
    name: call-nuget
    needs: [build, pack, test, sonarcloud, codecov, codeql]
    uses: codebeltnet/jobs-nuget-push/.github/workflows/default.yml@v2
    with:
      version: ${{ needs.build.outputs.version }}
      environment: Production
      configuration: ${{ inputs.configuration == '' && 'Release' || inputs.configuration }}
    secrets: inherit

Caller workflows to showcase the Codebelt experience

Basic CI/CD Pipeline

Intermediate CI/CD Pipeline

Advanced CI/CD Pipeline

Contributing to Reusable Workflows for NuGet Push

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

License

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

About

A reusable workflow for NuGet by Microsoft integration.

Resources

License

Stars

Watchers

Forks