Skip to content

Merge pull request #169 from christianhelle/renovate/microsoft.openap… #307

Merge pull request #169 from christianhelle/renovate/microsoft.openap…

Merge pull request #169 from christianhelle/renovate/microsoft.openap… #307

Workflow file for this run

name: VSIX
on:
workflow_dispatch:
push:
paths-ignore:
- '**/*'
- '!.github/workflows/vsix.yml'
- '!src/**/*.csproj'
- '!src/**/*.cs'
branches:
- '*'
pull_request:
branches:
- '*'
env:
VERSION: 0.1.${{ github.run_number }}
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Update Version
run: |
((Get-Content -Path HttpGenerator.Core\HttpGenerator.Core.csproj -Raw) -Replace "1.0.0", "${{ env.VERSION }}") | Set-Content -Path HttpGenerator.Core\HttpGenerator.Core.csproj
((Get-Content -Path HttpGenerator.VSIX\source.extension.vsixmanifest -Raw) -Replace "1.0.0", "${{ env.VERSION }}") | Set-Content -Path HttpGenerator.VSIX\source.extension.vsixmanifest
working-directory: src
shell: pwsh
- name: Restore
run: dotnet restore VSIX.sln
working-directory: src
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.3
- name: Build
run: msbuild VSIX.sln /property:Configuration=Release /p:DeployExtension=false
working-directory: src
- name: Move build output
run: |
mv src/HttpGenerator.VSIX/bin/Release/HttpGenerator.VSIX.vsix HttpGenerator-${{ env.VERSION }}.vsix
- name: Publish artifacts
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: |
*.vsix
- name: Publish to Open VSIX Gallery
if: github.ref == 'refs/heads/main'
run: |
(new-object Net.WebClient).DownloadString("https://raw.github.com/madskristensen/ExtensionScripts/master/AppVeyor/vsix.ps1") | iex
Vsix-PushArtifacts
Vsix-PublishToGallery -path HttpGenerator-${{ env.VERSION }}.vsix -readmeUrl https://raw.githubusercontent.com/christianhelle/HttpGenerator/master/docs/Marketplace.md
shell: pwsh
continue-on-error: true