feat (Tests): adds tests for DefaultDropPictureImageTagHelperRenderer #18
Workflow file for this run
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
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: Publish to NuGet | |
# on Push tags matching v1.0.0 or v1.0.0-suffix | |
on: | |
push: | |
tags: | |
[ "v[0-9]+.[0-9]+.[0-9]+", "v[0-9]+.[0-9]+.[0-9]+-[0-9a-z]+" ] | |
jobs: | |
build: | |
env: | |
SOLUTION: 'src\Rhythm.Drop.sln' | |
BUILD_CONFIG: 'Release' | |
runs-on: ubuntu-latest | |
steps: | |
# Setup | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
# Remove 'v' prefix from tag to match NuGet version format | |
- name: Set Package Version | |
run: | | |
echo "PACKAGE_VERSION=${GITHUB_REF_NAME/v/}" >> "$GITHUB_ENV" | |
- name: Display Package Version | |
run: | | |
echo "Package Version: $PACKAGE_VERSION" | |
# Restore | |
- name: Restore dependencies | |
run: dotnet restore $SOLUTION | |
# Test | |
- name: Test Rhythm.Drop.Builders | |
run: dotnet test ./tests/Rhythm.Drop.Builders.Tests/Rhythm.Drop.Builders.Tests.csproj | |
- name: Test Rhythm.Drop.Web | |
run: dotnet test ./tests/Rhythm.Drop.Web.Tests/Rhythm.Drop.Web.Tests.csproj | |
# Start packaging process | |
- name: Pack Rhythm.Drop.Models | |
run: dotnet pack ./src/Rhythm.Drop.Models/Rhythm.Drop.Models.csproj --no-restore -c $BUILD_CONFIG /p:version=$PACKAGE_VERSION | |
- name: Pack Rhythm.Drop.Infrastructure | |
run: dotnet pack ./src/Rhythm.Drop.Infrastructure/Rhythm.Drop.Infrastructure.csproj --no-restore -c $BUILD_CONFIG /p:version=$PACKAGE_VERSION | |
- name: Pack Rhythm.Drop.Builders | |
if: ${{ ! startsWith(env.PACKAGE_VERSION, '1.') }} | |
run: dotnet pack ./src/Rhythm.Drop.Builders/Rhythm.Drop.Builders.csproj --no-restore -c $BUILD_CONFIG /p:version=$PACKAGE_VERSION | |
- name: Pack Rhythm.Drop.Web.Infrastructure | |
run: dotnet pack ./src/Rhythm.Drop.Web.Infrastructure/Rhythm.Drop.Web.Infrastructure.csproj --no-restore -c $BUILD_CONFIG /p:version=$PACKAGE_VERSION | |
- name: Pack Rhythm.Drop.Web | |
run: dotnet pack ./src/Rhythm.Drop.Web/Rhythm.Drop.Web.csproj --no-restore -c $BUILD_CONFIG /p:version=$PACKAGE_VERSION | |
- name: Pack Rhythm.Drop | |
run: dotnet pack ./src/Rhythm.Drop/Rhythm.Drop.csproj --no-restore -c $BUILD_CONFIG /p:version=$PACKAGE_VERSION | |
- name: Publish Packages to NuGet | |
run: dotnet nuget push **\*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json | |