Skip to content

Commit

Permalink
Merge branch 'main' into feature/concat-to-interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
josefpihrt authored Jan 25, 2024
2 parents 1ed8ce1 + d08e7dc commit 3908b3d
Showing 1 changed file with 57 additions and 47 deletions.
104 changes: 57 additions & 47 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run:
working-directory: src
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: dotnet tool install -g GitVersion.Tool --version 5.11.1
Expand Down Expand Up @@ -56,11 +56,11 @@ jobs:
- run: |
dotnet format Roslynator.sln --no-restore --verify-no-changes --severity info
- run: dotnet test Roslynator.sln --no-build
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: josefpihrt/wordb
path: wordb
- run: dotnet tool install -g Roslynator.DotNet.Cli --version 0.7.0
- run: dotnet tool install -g Roslynator.DotNet.Cli --version 0.8.3
- run: |
roslynator spellcheck Roslynator.sln --dry-run --scope all --words \
spellcheck \
Expand All @@ -80,13 +80,13 @@ jobs:
run:
working-directory: src
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: dotnet restore Roslynator.CoreAndTesting.slnf
- run: dotnet build Roslynator.CoreAndTesting.slnf --no-restore
- run: dotnet pack Roslynator.CoreAndTesting.slnf --no-build -o _nupkg
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: nuget_packages
name: nuget_core_and_testing
path: src/_nupkg/*nupkg

build_analyzers:
Expand All @@ -98,25 +98,28 @@ jobs:
strategy:
matrix:
component:
- name: Analyzers
- id: analyzers
name: Analyzers
propertyName: Analyzers
- name: Formatting.Analyzers
- id: formatting_analyzers
name: Formatting.Analyzers
propertyName: FormattingAnalyzers
- name: CodeAnalysis.Analyzers
- id: code_analysis_analyzers
name: CodeAnalysis.Analyzers
propertyName: CodeAnalysisAnalyzers
defaults:
run:
working-directory: src/${{ matrix.component.name }}.CodeFixes
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- 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 pack --no-build
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: nuget_packages
name: nuget_${{ matrix.component.id }}
path: src/${{ matrix.component.name }}.CodeFixes/bin/Release/*.*nupkg

build_refactorings:
Expand All @@ -129,15 +132,15 @@ jobs:
run:
working-directory: src/Refactorings
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: dotnet restore --force /p:RoslynVersion=roslyn3.8
- run: dotnet build --no-restore /p:RoslynatorRefactoringsNuGet=true /p:RoslynVersion=roslyn3.8
- run: dotnet restore --force /p:RoslynVersion=roslyn4.7
- run: dotnet build --no-restore /p:RoslynatorRefactoringsNuGet=true /p:RoslynVersion=roslyn4.7
- run: dotnet pack --no-build
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: nuget_packages
name: nuget_refactorings
path: src/Refactorings/bin/Release/*.*nupkg

build_code_fixes:
Expand All @@ -150,15 +153,15 @@ jobs:
run:
working-directory: src/CodeFixes
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: dotnet restore --force /p:RoslynVersion=roslyn3.8
- run: dotnet build --no-restore /p:RoslynatorCodeFixesNuGet=true /p:RoslynVersion=roslyn3.8
- run: dotnet restore --force /p:RoslynVersion=roslyn4.7
- run: dotnet build --no-restore /p:RoslynatorCodeFixesNuGet=true /p:RoslynVersion=roslyn4.7
- run: dotnet pack --no-build
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: nuget_packages
name: nuget_code_fixes
path: src/CodeFixes/bin/Release/*.*nupkg

build_vs_extension:
Expand All @@ -172,23 +175,28 @@ jobs:
run:
working-directory: src/VisualStudio
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: (Get-Content source.extension.vsixmanifest) -replace 'Version="1.0.0"', 'Version="${{ needs.pre_build.outputs.version3 }}"' | Set-Content source.extension.vsixmanifest
- run: dotnet restore
- uses: microsoft/setup-msbuild@v1.1
- uses: microsoft/setup-msbuild@v1.3
- run: msbuild -m
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: vs_extension
name: vs_extension_vsix
path: src/VisualStudio/bin/Release/net472/*.vsix
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: vs_extension
name: vs_extension_manifest
path: src/VisualStudio/manifest.json
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: vs_extension
name: vs_extension_overview
path: src/VisualStudio/Overview.md
- uses: actions/upload-artifact/merge@v4
with:
name: vs_extension
pattern: vs_extension_*
delete-merged: true

build_vs_code_extension:
if: github.ref_type != 'tag' || startsWith(github.ref_name, 'v')
Expand All @@ -200,7 +208,7 @@ jobs:
run:
working-directory: src/VisualStudioCode
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: dotnet restore
- run: dotnet build --no-restore
- run: |
Expand All @@ -227,15 +235,15 @@ jobs:
- run: npm install -g @vscode/vsce
- run: vsce package
working-directory: src/VisualStudioCode/package
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: vs_code_extension
path: src/VisualStudioCode/package/*.vsix
- run: rm package/*.vsix
- run: sed -i s/ms-dotnettools.csharp/muhammad-sammy.csharp/ package/package.json
- run: vsce package
working-directory: src/VisualStudioCode/package
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ovsx_extension
path: src/VisualStudioCode/package/*.vsix
Expand All @@ -252,13 +260,13 @@ jobs:
run:
working-directory: src/CommandLine
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: dotnet restore
- run: dotnet build --no-restore
- run: dotnet pack --no-build
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: nuget_packages
name: nuget_core_cli
path: src/CommandLine/bin/Release/*.*nupkg

build_framework_cli:
Expand All @@ -273,46 +281,48 @@ jobs:
run:
working-directory: src/CommandLine
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: dotnet restore
- run: dotnet build --no-restore
- run: dotnet publish --no-build
- run: dotnet pack --no-build
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: nuget_packages
name: nuget_framework_cli
path: src/CommandLine/bin/Release/*.*nupkg

publish_nuget_packages:
needs: [ build_core_and_testing, build_analyzers, build_refactorings, build_code_fixes ]
runs-on: ubuntu-22.04
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: nuget_packages
path: nuget_packages
pattern: nuget_*
path: nuget
merge-multiple: true
- run: dotnet nuget push "*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s "https://api.nuget.org/v3/index.json" --skip-duplicate
working-directory: nuget_packages
working-directory: nuget

publish_cli_nuget_packages:
needs: [ build_core_cli, build_framework_cli ]
runs-on: ubuntu-22.04
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'cli-v')
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: nuget_packages
path: nuget_packages
pattern: nuget_*
path: nuget
merge-multiple: true
- run: dotnet nuget push "*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s "https://api.nuget.org/v3/index.json" --skip-duplicate
working-directory: nuget_packages
working-directory: nuget

publish_vs_code_extension:
needs: [ pre_build, build_vs_code_extension ]
needs: [ pre_build, build_vs_extension ]
runs-on: ubuntu-22.04
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: vs_code_extension
path: vs_code_extension
Expand All @@ -325,7 +335,7 @@ jobs:
runs-on: ubuntu-22.04
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: ovsx_extension
path: ovsx_extension
Expand All @@ -338,7 +348,7 @@ jobs:
runs-on: windows-latest
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: vs_extension
path: vs_extension
Expand Down

0 comments on commit 3908b3d

Please sign in to comment.