Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
vnbaaij committed Jan 31, 2023
2 parents 4718112 + 4ed8429 commit 21e0177
Show file tree
Hide file tree
Showing 15,271 changed files with 136,408 additions and 36,057 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
86 changes: 86 additions & 0 deletions .azure-devops/cd-publish-efadapter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Publish Microsoft Fast-Blazor

pr: none
trigger: none

pool:
vmImage: 'windows-2022'

variables:
project: '**/Microsoft.Fast.Components.FluentUI.DataGrid.EntityFrameworkAdapter.csproj'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'

steps:
- task: NuGetToolInstaller@1
displayName: Install NuGet tools

- task: UseDotNet@2
displayName: 'Install .NET 6.0'
inputs:
version: 6.0.405
includePreviewVersions: true

- task: UseDotNet@2
displayName: 'Install .NET 7.0'
inputs:
version: 7.0.102
includePreviewVersions: true

- task: DotNetCoreCLI@2
displayName: Restore packages
inputs:
command: 'restore'
projects: $(project)

- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: 'build'
projects: $(project)

- task: DotNetCoreCLI@2
displayName: Pack
inputs:
command: 'pack'
packagesToPack: $(project)
versioningScheme: 'off'

- task: EsrpCodeSigning@2
displayName: Code Signing Assemblies (Authenticode Signing)
inputs:
ConnectedServiceName: 'FAST-NuGet-Publishing-SC'
FolderPath: '$(Build.ArtifactStagingDirectory)'
Pattern: |
**/*.nupkg
UseMinimatch: true
signConfigType: 'inlineSignParams'
inlineOperation: |
[
{
"KeyCode" : "CP-401405",
"OperationCode" : "NuGetSign",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
},
{
"KeyCode" : "CP-401405",
"OperationCode" : "NuGetVerify",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
}
]
SessionTimeout: '60'
MaxConcurrency: '200'
MaxRetryAttempts: '5'


- task: NuGetCommand@2
displayName: Publish to NuGet
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)\*.nupkg;'
nuGetFeedType: 'external'
publishFeedCredentials: 'NugetServiceConnect'
13 changes: 7 additions & 6 deletions .azure-devops/cd-publish-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ steps:
displayName: Install NuGet tools

- task: UseDotNet@2
displayName: 'Install .NET 2.1 for ESRP Code Sign tool'
inputs:
version: 2.1.x
displayName: 'Install .NET 6.0'
inputs:
version: 6.0.405
includePreviewVersions: true

- task: UseDotNet@2
displayName: 'Install .NET Core 6.0'
displayName: 'Install .NET 7.0'
inputs:
version: 6.0.x
version: 7.0.102
includePreviewVersions: true

- task: DotNetCoreCLI@2
Expand All @@ -38,7 +39,7 @@ steps:
packagesToPack: $(project)
versioningScheme: 'off'

- task: EsrpCodeSigning@1
- task: EsrpCodeSigning@2
displayName: Code Signing Assemblies (Authenticode Signing)
inputs:
ConnectedServiceName: 'FAST-NuGet-Publishing-SC'
Expand Down
11 changes: 3 additions & 8 deletions .azure-devops/cd-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,16 @@ steps:
- task: NuGetToolInstaller@1
displayName: Install NuGet tools

- task: UseDotNet@2
displayName: 'Install .NET Core 2.1 for ESRP Code Sign tool'
inputs:
version: 2.1.x

- task: UseDotNet@2
displayName: 'Install .NET 6.0'
inputs:
version: 6.0.x
version: 6.0.405
includePreviewVersions: true

- task: UseDotNet@2
displayName: 'Install .NET 7.0'
inputs:
version: 7.0.100
version: 7.0.102
includePreviewVersions: true

- task: DotNetCoreCLI@2
Expand All @@ -51,7 +46,7 @@ steps:
packagesToPack: $(project)
versioningScheme: 'off'

- task: EsrpCodeSigning@1
- task: EsrpCodeSigning@2
displayName: Code Signing Assemblies (Authenticode Signing)
inputs:
ConnectedServiceName: 'FAST-NuGet-Publishing-SC'
Expand Down
39 changes: 27 additions & 12 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ csharp_style_var_for_built_in_types = false
csharp_style_var_when_type_is_apparent = false

# Expression-bodied members
csharp_style_expression_bodied_accessors = true
csharp_style_expression_bodied_constructors = false
csharp_style_expression_bodied_indexers = true
csharp_style_expression_bodied_lambdas = true
csharp_style_expression_bodied_local_functions = false
csharp_style_expression_bodied_methods = false
csharp_style_expression_bodied_operators = false
csharp_style_expression_bodied_properties = true
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_expression_bodied_methods = false:silent
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true:silent

# Pattern matching preferences
csharp_style_pattern_matching_over_as_with_null_check = true
Expand All @@ -105,9 +105,9 @@ csharp_prefer_static_local_function = true
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async

# Code-block preferences
csharp_prefer_braces = true
csharp_prefer_simple_using_statement = true
csharp_style_namespace_declarations = block_scoped
csharp_prefer_braces = true:silent
csharp_prefer_simple_using_statement = true:suggestion
csharp_style_namespace_declarations = block_scoped:silent

# Expression-level preferences
csharp_prefer_simple_default_expression = true
Expand All @@ -124,7 +124,7 @@ csharp_style_unused_value_assignment_preference = discard_variable
csharp_style_unused_value_expression_statement_preference = discard_variable

# 'using' directive preferences
csharp_using_directive_placement = outside_namespace
csharp_using_directive_placement = outside_namespace:silent

# New line preferences
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
Expand Down Expand Up @@ -219,3 +219,18 @@ dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case

# Default severity for analyzer diagnostics with category 'Usage'
dotnet_analyzer_diagnostic.category-Usage.severity = none
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent

[*.{cs,vb}]
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 4
indent_size = 4
end_of_line = crlf
11 changes: 7 additions & 4 deletions .github/workflows/ci-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Validate

on:
push:
branches: [ main ]
branches:
- main
paths-ignore:
- '**/*.md'
- '**/*.gitignore'
Expand Down Expand Up @@ -30,13 +31,13 @@ jobs:
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
6.0.402
7.0.100
6.0.405
7.0.102
include-prerelease: true
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet publish -c Release -o publish -f net7.0 -r linux-x64 examples/FluentUI.Demo.Client/
run: dotnet publish -c Release -o publish -f net7.0 -r linux-x64 --sc examples/FluentUI.Demo.Client/
- name: Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
Expand All @@ -48,6 +49,8 @@ jobs:
api_location: "Api"
output_location: "publish/wwwroot"
skip_api_build: true
skip_app_build: true
production_branch: "main"

destroy:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
Expand Down
92 changes: 57 additions & 35 deletions .github/workflows/cicd_publish.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
name: "Build, Sign, Publish"

name: Build package and deploy demo
on:
push:
branches:
- main
branches:
- main
paths-ignore:
- '**/*.md'
- '**/*.gitignore'
- '**/*.gitattributes'
- '**/*.yml'

pull_request:
types: [opened, synchronize, reopened, closed]
branches: [ main ]
paths-ignore:
- '**/*.md'
- '**/*.gitignore'
- '**/*.gitattributes'

workflow_dispatch:
branches:
- main
paths-ignore:
- '**/*.md'
- '**/*.gitignore'
- '**/*.gitattributes'
- '**/*.yml'


jobs:
build:
name: Build, Pack, Publish
build_package:
name: Build and pack library package
runs-on: ubuntu-latest
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
Expand All @@ -35,50 +41,52 @@ jobs:

steps:
- uses: actions/checkout@v3


- name: Setup .NET
- name: .NET Setup SDKs
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
6.0.402
7.0.100
6.0.405
7.0.102
include-prerelease: true

- name: Restore

- name: Create build number
run: echo "BUILD_NUMBER=$NOW.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV

- name: .NET Restore
run: dotnet restore ${{ env.PROJECT }}

- name: Build
run: dotnet build ${{ env.PROJECT }} --configuration ${{ env.BUILD_CONFIG }} --no-restore

- name: .NET Build package
run: dotnet build ${{ env.PROJECT }} --configuration ${{ env.BUILD_CONFIG }} --no-restore -p:BuildNumber=$BUILD_NUMBER -p:SourceRevisionId=$GITHUB_SHA -p:ContinuousIntegrationBuild=true

- name: Pack
run: dotnet pack ${{ env.PROJECT }} --configuration ${{ env.BUILD_CONFIG }} -o packed --no-build

- name: Publish artifacts
- name: .NET Pack package
run: dotnet pack ${{ env.PROJECT }} --configuration ${{ env.BUILD_CONFIG }} --no-build --output artifacts/ci --verbosity normal -p:BuildNumber=$BUILD_NUMBER -p:SourceRevisionId=$GITHUB_SHA -p:ContinuousIntegrationBuild=true

- name: Upload package
uses: actions/upload-artifact@v3
with:
name: signednupkg
path: packed
name: nupkg
path: artifacts/**/*.nupkg
retention-days: 5

deploy:
deploy_demo:
runs-on: ubuntu-latest
needs: build
name: Deploy Demo
name: Build and deploy Demo site
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup .NET SDK
- name: .NET Setup SDKs
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
6.0.402
7.0.100
6.0.405
7.0.102
include-prerelease: true
- name: Dotnet Publish
run: dotnet publish -c Release -o publish -f net7.0 -r linux-x64 examples/FluentUI.Demo.Client/
- name: Deploy
- name: Restore dependencies
run: dotnet restore
- name: .NET Publish
run: dotnet publish -c Release -o publish -f net7.0 -r linux-x64 --sc examples/FluentUI.Demo.Client/
- name: Deploy demo site
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
Expand All @@ -89,3 +97,17 @@ jobs:
api_location: "Api"
output_location: "publish/wwwroot"
skip_api_build: true
skip_app_build: true

destroy:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close PR Job

steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APP_PR_TOKEN }}
action: "close"
Loading

0 comments on commit 21e0177

Please sign in to comment.