Skip to content

VersionBump : v0.36.1 #29

VersionBump : v0.36.1

VersionBump : v0.36.1 #29

Workflow file for this run

name: Publish Packages
on:
push:
tags:
- 'v*.*.*' # Match version tags like v1.0.0
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '9.x'
- name: Restore dependencies
run: dotnet restore CodeOfChaos.Extensions.sln
- name: Build
run: dotnet build CodeOfChaos.Extensions.sln --configuration Release --no-restore
# Save build outputs as an artifact
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: |
src/**/bin/Release/
tests/**/bin/Release/
test-all:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
test-project:
- Tests.CodeOfChaos.Extensions
- Tests.CodeOfChaos.Extensions.Analyzers
- Tests.CodeOfChaos.Extensions.AspNetCore
- Tests.CodeOfChaos.Extensions.DependencyInjection
- Tests.CodeOfChaos.Extensions.DependencyInjection.Generators
- Tests.CodeOfChaos.Extensions.EntityFrameworkCore
- Tests.CodeOfChaos.Extensions.Serilog
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '9.x'
# Download the build artifacts
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts
# Run tests using the artifacts
- name: Run tests for ${{ matrix.test-project }}
run: dotnet test -c Release --no-build --no-restore
working-directory: tests/${{ matrix.test-project }}
publish:
needs: test-all
runs-on: ubuntu-latest
strategy:
matrix:
package:
- CodeOfChaos.Extensions
- CodeOfChaos.Extensions.Analyzers
- CodeOfChaos.Extensions.AspNetCore
- CodeOfChaos.Extensions.DependencyInjection
- CodeOfChaos.Extensions.DependencyInjection.Generators
- CodeOfChaos.Extensions.EntityFrameworkCore
- CodeOfChaos.Extensions.Serilog
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '9.x'
# Download the build artifacts
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts
# Push the corresponding NuGet package
- name: Publish ${{ matrix.package }} to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push src/${{ matrix.package }}/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json --skip-duplicate