CI/CD Pipeline
The CI/CD pipeline for this project is automated using GitHub Actions. This pipeline ensures code quality, automated testing, and efficient releases.
Workflow Breakdown
The CI/CD pipeline is defined in the .github/workflows
directory, which contains .yml
files outlining different workflows.
build.yml
Workflow:
- Trigger: This workflow is triggered on every push or pull request to the
main
branch. - Tasks:
- Build: The workflow builds the project using the specified target frameworks.
- Test: Automated tests are executed to ensure code quality and functionality.
- Package: The project is packaged as a NuGet package.
- Publish: The NuGet package is published to the GitHub Packages repository.
- Deploy: The workflow deploys the package to a specific NuGet feed if the build passes.
Workflow Customization
The CI/CD pipeline can be customized through the .yml
files in the .github/workflows
directory. Here are some possible options:
Triggers:
- Push: Trigger on pushes to the
main
branch. - Pull Request: Trigger on pull requests to the
main
branch. - Scheduled: Trigger on a set schedule.
- Manual: Trigger manually.
Tasks:
- Build: Customize the build process, such as specifying different target frameworks.
- Test: Specify different test suites or test environments.
- Publish: Customize the NuGet package publication settings.
- Deploy: Configure deployments to different NuGet feeds.
Examples:
- Triggering on Pull Requests:
on:
pull_request:
branches:
- main
- Customizing Build Configuration:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: dotnet build -c Release -f netstandard2.0
- Publishing to a Specific NuGet Feed:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Publish
uses: NuGet/setup-nuget@v2
with:
nuget-version: 6.x
- name: Publish to MyFeed
run: dotnet nuget push -s https://api.myfeed.com/v3/index.json -k my-api-key StringlyTyped.nupkg
Note: The specific options and configurations for the CI/CD pipeline can be found in the .github/workflows
directory. This outline provides a general overview of the pipeline and its customization possibilities.
## Top-Level Directory Explanations
<a class='local-link directory-link' data-ref="samples/" href="#samples/">samples/</a> - This directory contains example projects demonstrating the usage of StringlyTyped library.
<a class='local-link directory-link' data-ref="src/" href="#src/">src/</a> - This directory contains the source code of the StringlyTyped library.
<a class='local-link directory-link' data-ref="tests/" href="#tests/">tests/</a> - This directory contains unit tests for the StringlyTyped library. It includes benchmark tests and small tests.