Update dotnet monorepo to v10 #6509
This file contains hidden or 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
| name: VSIX | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths-ignore: | |
| - '**/*' | |
| - '!.github/workflows/vsix.yml' | |
| - '!src/Core/**/*' | |
| - '!src/VSIX/**/*' | |
| pull_request: | |
| paths-ignore: | |
| - '**/*' | |
| - '!.github/workflows/vsix.yml' | |
| - '!src/Core/**/*' | |
| - '!src/VSIX/**/*' | |
| schedule: | |
| - cron: '0 8 * * *' | |
| env: | |
| VERSION: 1.39.${{ github.run_number }} | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Update Version | |
| run: | | |
| ((Get-Content -Path Core/ApiClientCodeGen.Core/ApiClientCodeGen.Core.csproj -Raw) -Replace ">1.0.0<", ">${{ env.VERSION }}<") | Set-Content -Path Core/ApiClientCodeGen.Core/ApiClientCodeGen.Core.csproj | |
| ((Get-Content -Path VSIX/ApiClientCodeGen.VSIX.Extensibility/ApiClientCodeGen.VSIX.Extensibility.csproj -Raw) -Replace ">1.0.0<", ">${{ env.VERSION }}<") | Set-Content -Path VSIX/ApiClientCodeGen.VSIX.Extensibility/ApiClientCodeGen.VSIX.Extensibility.csproj | |
| ((Get-Content -Path VSIX/ApiClientCodeGen.VSIX/source.extension.vsixmanifest -Raw) -Replace "1.0.0", "${{ env.VERSION }}") | Set-Content -Path VSIX/ApiClientCodeGen.VSIX/source.extension.vsixmanifest | |
| ((Get-Content -Path VSIX/ApiClientCodeGen.VSIX.Dev17/source.extension.vsixmanifest -Raw) -Replace "1.0.0", "${{ env.VERSION }}") | Set-Content -Path VSIX/ApiClientCodeGen.VSIX.Dev17/source.extension.vsixmanifest | |
| working-directory: src | |
| shell: pwsh | |
| - name: Setup MSBuild.exe | |
| uses: microsoft/setup-msbuild@v3 | |
| - name: Restore | |
| run: msbuild VSIX.slnx -t:Restore | |
| working-directory: src | |
| - name: Build | |
| run: msbuild VSIX.slnx /property:Configuration=Release /p:DeployExtension=false | |
| working-directory: src | |
| - name: Move build output | |
| run: | | |
| mv src/VSIX/ApiClientCodeGen.VSIX/bin/Release/ApiClientCodeGenerator.vsix ApiClientCodeGenerator-VS2019-${{ env.VERSION }}.vsix | |
| mv src/VSIX/ApiClientCodeGen.VSIX.Dev17/bin/Release/ApiClientCodeGenerator.vsix ApiClientCodeGenerator-VS2022-${{ env.VERSION }}.vsix | |
| mv src/VSIX/ApiClientCodeGen.VSIX.Extensibility/bin/Release/net8.0/ApiClientCodeGen.VSIX.Extensibility.vsix ApiClientCodeGen.VSIX.Extensibility-${{ env.VERSION }}.vsix | |
| - name: Publish artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: Artifacts | |
| path: | | |
| *.vsix | |
| docs/Marketplace*.md | |
| - name: Publish to Open VSIX Gallery | |
| if: github.ref == 'refs/heads/master' | |
| run: | | |
| (new-object Net.WebClient).DownloadString("https://raw.github.com/madskristensen/ExtensionScripts/master/AppVeyor/vsix.ps1") | iex | |
| Vsix-PushArtifacts | |
| Vsix-PublishToGallery -path ApiClientCodeGenerator-VS2019-${{ env.VERSION }}.vsix -readmeUrl https://raw.githubusercontent.com/christianhelle/apiclientcodegen/master/docs/Marketplace.md | |
| Vsix-PublishToGallery -path ApiClientCodeGenerator-VS2022-${{ env.VERSION }}.vsix -readmeUrl https://raw.githubusercontent.com/christianhelle/apiclientcodegen/master/docs/Marketplace2022.md | |
| Vsix-PublishToGallery -path ApiClientCodeGen.VSIX.Extensibility-${{ env.VERSION }}.vsix -readmeUrl https://raw.githubusercontent.com/christianhelle/apiclientcodegen/master/docs/Marketplace2026.md | |
| shell: pwsh | |
| continue-on-error: true |