-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/Blazored/FluentValidation i…
…nto main
- Loading branch information
Showing
6 changed files
with
158 additions
and
60 deletions.
There are no files selected for viewing
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
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 |
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
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 |
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 file was deleted.
Oops, something went wrong.
58 changes: 35 additions & 23 deletions
58
src/Blazored.FluentValidation/Blazored.FluentValidation.csproj
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
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> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.