Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
josefpihrt committed Jan 10, 2024
1 parent 98a1e07 commit 8f92a37
Showing 1 changed file with 65 additions and 15 deletions.
80 changes: 65 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,27 +97,63 @@ jobs:
Version: ${{ needs.pre_build.outputs.version }}
strategy:
matrix:
component:
- name: Analyzers
propertyName: Analyzers
- name: Formatting.Analyzers
propertyName: FormattingAnalyzers
- name: CodeAnalysis.Analyzers
propertyName: CodeAnalysisAnalyzers
version: [ 3.8, 4.7 ]
defaults:
run:
working-directory: src/Analyzers.CodeFixes
steps:
- uses: actions/checkout@v3
- run: dotnet restore --force /p:RoslynVersion=roslyn${{ matrix.version }}
- run: dotnet build --no-restore /p:RoslynatorAnalyzersNuGet=true /p:RoslynVersion=roslyn${{ matrix.version }}
- run: dotnet pack --no-build
- uses: actions/upload-artifact@v3
with:
name: nuget_packages
path: src/Analyzers.CodeFixes/bin/Release/*.*nupkg

build_formatting_analyzers:
if: github.ref_type != 'tag' || startsWith(github.ref_name, 'v')
needs: pre_build
runs-on: ubuntu-22.04
env:
Version: ${{ needs.pre_build.outputs.version }}
strategy:
matrix:
version: [ 3.8, 4.7 ]
defaults:
run:
working-directory: src/${{ matrix.component.name }}.CodeFixes
working-directory: src/Formatting.Analyzers.CodeFixes
steps:
- uses: actions/checkout@v3
- run: dotnet restore --force /p:RoslynVersion=roslyn3.8
- run: dotnet build --no-restore /p:Roslynator${{ matrix.component.propertyName }}NuGet=true /p:RoslynVersion=roslyn3.8
- run: dotnet restore --force /p:RoslynVersion=roslyn4.7
- run: dotnet build --no-restore /p:Roslynator${{ matrix.component.propertyName }}NuGet=true /p:RoslynVersion=roslyn4.7
- run: dotnet restore --force /p:RoslynVersion=roslyn${{ matrix.version }}
- run: dotnet build --no-restore /p:RoslynatorFormattingAnalyzersNuGet=true /p:RoslynVersion=roslyn${{ matrix.version }}
- run: dotnet pack --no-build
- uses: actions/upload-artifact@v3
with:
name: nuget_packages
path: src/Formatting.Analyzers.CodeFixes/bin/Release/*.*nupkg

build_code_analysis_analyzers:
if: github.ref_type != 'tag' || startsWith(github.ref_name, 'v')
needs: pre_build
runs-on: ubuntu-22.04
env:
Version: ${{ needs.pre_build.outputs.version }}
strategy:
matrix:
version: [ 3.8, 4.7 ]
defaults:
run:
working-directory: src/CodeAnalysis.Analyzers.CodeFixes
steps:
- uses: actions/checkout@v3
- run: dotnet restore --force /p:RoslynVersion=roslyn${{ matrix.version }}
- run: dotnet build --no-restore /p:RoslynatorCodeAnalysisAnalyzersNuGet=true /p:RoslynVersion=roslyn${{ matrix.version }}
- run: dotnet pack --no-build
- uses: actions/upload-artifact@v3
with:
name: nuget_packages
path: src/${{ matrix.component.name }}.CodeFixes/bin/Release/*.*nupkg
path: src/CodeAnalysis.Analyzers.CodeFixes/bin/Release/*.*nupkg

build_refactorings:
if: github.ref_type != 'tag' || startsWith(github.ref_name, 'v')
Expand Down Expand Up @@ -194,7 +230,14 @@ jobs:

build_vs_code_extension:
if: github.ref_type != 'tag' || startsWith(github.ref_name, 'v')
needs: [ pre_build, build_analyzers ]
needs: [
pre_build,
build_analyzers,
build_formatting_analyzers,
build_code_analysis_analyzers,
build_refactorings,
build_code_fixes
]
runs-on: ubuntu-22.04
env:
Version: ${{ needs.pre_build.outputs.version }}
Expand Down Expand Up @@ -286,7 +329,14 @@ jobs:
path: src/CommandLine/bin/Release/*.*nupkg

publish_nuget_packages:
needs: [ build_core_and_testing, build_analyzers, build_refactorings, build_code_fixes ]
needs: [
build_core_and_testing,
build_analyzers,
build_formatting_analyzers,
build_code_analysis_analyzers,
build_refactorings,
build_code_fixes
]
runs-on: ubuntu-22.04
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
steps:
Expand Down

0 comments on commit 8f92a37

Please sign in to comment.