Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Blazored/FluentValidation i…
Browse files Browse the repository at this point in the history
…nto main
  • Loading branch information
Chris Sainty committed Jul 14, 2020
2 parents 1971bec + 701a9df commit 65b9d84
Show file tree
Hide file tree
Showing 6 changed files with 158 additions and 60 deletions.
92 changes: 92 additions & 0 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Build & Test Main

on:
push:
branches: [ main ]
release:
types: [ published ]

env:
NETCORE_VERSION: '3.1.301'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
PROJECT_NAME: Blazored.FluentValidation
GITHUB_FEED: https://nuget.pkg.github.com/Blazored/
GITHUB_USER: chrissainty
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_FEED: https://api.nuget.org/v3/index.json
NUGET_KEY: ${{ secrets.NUGET_KEY }}

jobs:
build:
name: Build, test and pack
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup .NET Core ${{ env.NETCORE_VERSION }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.NETCORE_VERSION }}
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Restore
run: dotnet restore

- name: Build
run: dotnet build -c Release --no-restore src/$PROJECT_NAME/$PROJECT_NAME.csproj

- name: Test
run: dotnet test -c Release

- name: Pack
run: dotnet pack -v normal -c Release --no-restore --include-symbols --include-source -p:PackageVersion=$GITHUB_RUN_ID src/$PROJECT_NAME/$PROJECT_NAME.*proj

- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: nupkg
path: ./src/${{ env.PROJECT_NAME }}/bin/Release/*.nupkg
prerelease:
needs: build
if: github.event_name != 'release'
runs-on: ubuntu-latest
steps:
- name: Download Artifact
uses: actions/download-artifact@v1
with:
name: nupkg
- name: Push to GitHub Feed
run: |
for f in ./nupkg/*.nupkg
do
curl -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED
done
deploy:
needs: build
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.NETCORE_VERSION }}
- name: Create Release NuGet package
run: |
arrTag=(${GITHUB_REF//\// })
VERSION="${arrTag[2]}"
echo Version: $VERSION
VERSION="${VERSION//v}"
echo Clean Version: $VERSION
dotnet pack -v normal -c Release --include-symbols --include-source -p:PackageVersion=$VERSION -o nupkg src/$PROJECT_NAME/$PROJECT_NAME.*proj
- name: Push to GitHub Feed
run: |
for f in ./nupkg/*.nupkg
do
curl -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED
done
- name: Push to NuGet Feed
run: dotnet nuget push ./nupkg/*.nupkg --source $NUGET_FEED --skip-duplicate --api-key $NUGET_KEY
30 changes: 30 additions & 0 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build & Test PR

on:
pull_request:
branches: [ main ]

env:
PROJECT_NAME: Blazored.FluentValidation
NETCORE_VERSION: '3.1.301'

jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setting up .NET Core SDK ${{ env.NETCORE_VERSION }}...
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.NETCORE_VERSION }}

- name: Restoring packages...
run: dotnet restore

- name: Building project...
run: dotnet build --configuration Release --no-restore src/$PROJECT_NAME/$PROJECT_NAME.csproj

- name: Testing...
run: dotnet test --no-restore --verbosity normal
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# FluentValidation
A library for using FluentValidation with Blazor

[![Build Status](https://dev.azure.com/blazored/FluentValidation/_apis/build/status/Blazored.FluentValidation?branchName=master)](https://dev.azure.com/blazored/FluentValidation/_build/latest?definitionId=11&branchName=master)
![Build & Test Main](https://github.com/Blazored/FluentValidation/workflows/Build%20&%20Test%20Main/badge.svg)

![Nuget](https://img.shields.io/nuget/v/blazored.fluentvalidation.svg)

Expand Down
36 changes: 0 additions & 36 deletions azure-pipelines.yml

This file was deleted.

58 changes: 35 additions & 23 deletions src/Blazored.FluentValidation/Blazored.FluentValidation.csproj
Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RazorLangVersion>3.0</RazorLangVersion>
<RootNamespace>Blazored.FluentValidation</RootNamespace>

<PackageId>Blazored.FluentValidation</PackageId>
<Version>1.3.0</Version>
<Authors>Chris Sainty</Authors>
<Description>A library for using FluentValidation with Blazor</Description>
<Copyright>Copyright 2019 (c) Chris Sainty. All rights reserved.</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/blazored/FluentValidation</PackageProjectUrl>
<PackageIconUrl>https://avatars1.githubusercontent.com/u/39194025</PackageIconUrl>
<RepositoryUrl>https://github.com/blazored/FluentValidation</RepositoryUrl>
<PackageTags>Blazor FluentValidation Blazored Components Fluent Validation</PackageTags>
<Company />
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentValidation" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.5" />
</ItemGroup>
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<RazorLangVersion>3.0</RazorLangVersion>

<Authors>Chris Sainty</Authors>
<Company></Company>
<Copyright>Copyright 2020 (c) Chris Sainty. All rights reserved.</Copyright>

<Description>A library for using FluentValidation with Blazor</Description>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

<!-- NuGet settings -->
<PackageId>Blazored.FluentValidation</PackageId>
<PackageTags>Blazor;FluentValidation;Fluent Validation;Blazored;Components;ASP.NET Core;CSharp;Web</PackageTags>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/Blazored/FluentValidation</PackageProjectUrl>
<PackageIcon>icon.png</PackageIcon>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/Blazored/FluentValidation</RepositoryUrl>

<!-- SourceLink settings -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentValidation" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.5" />
</ItemGroup>

<ItemGroup>
<None Include="icon.png" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
Binary file added src/Blazored.FluentValidation/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 65b9d84

Please sign in to comment.