Update README.md #73
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI/CD | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup .NET 8 | |
uses: actions/setup-dotnet@v3 | |
with: | |
global-json-file: global.json | |
- name: Restore | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore /p:ContinuousIntegrationBuild=true | |
- name: Test | |
run: dotnet test --no-restore --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover | |
- name: Upload to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./tests/LiteBus.Commands.UnitTests/coverage.opencover.xml, ./tests/LiteBus.Events.UnitTests/coverage.opencover.xml, ./tests/LiteBus.Queries.UnitTests/coverage.opencover.xml, ./tests/LiteBus.UnitTests/coverage.opencover.xml | |
flags: unittests | |
fail_ci_if_error: true | |
verbose: true | |
- name: Generate Nuget Packages | |
run: dotnet pack --configuration Release | |
- name: Publish Nuget Packages to Nuget.org | |
run: dotnet nuget push src/**/bin/Release/*.nupkg -k ${{secrets.Nuget_API_Key}} -s https://api.nuget.org/v3/index.json --skip-duplicate | |
- name: Publish Nuget Packages to Github | |
run: | | |
dotnet nuget add source --username litenova --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/litenova/index.json" | |
dotnet nuget push src/**/bin/Release/*.nupkg -s "github" --skip-duplicate | |