-
-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (50 loc) · 2.04 KB
/
release-vsix.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Release (VSIX)
on:
workflow_dispatch:
push:
branches:
- 'release'
env:
VERSION: 0.4.0
NUGET_REPO_URL: 'https://api.nuget.org/v3/index.json'
jobs:
VSIX:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Sets environment variables - branch-name
uses: nelonoel/branch-name@v1.0.1
- name: Sets environment variables - Nerdbank.GitVersioning
uses: dotnet/nbgv@master
with:
setAllVars: true
- 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.vsix
- name: Publish artifacts
uses: actions/upload-artifact@v4
with:
name: Visual Studio Extension
path: |
*.vsix
docs/Marketplace*.md
- name: Publish VSIX Packages
continue-on-error: true
run: |
$VsixPublisher = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe"
& $VsixPublisher login -personalAccessToken ${{ secrets.MARKETPLACE_PAT }} -publisherName ChristianResmaHelle
& $VsixPublisher publish -payload HttpGenerator-${{ env.VERSION }}.vsix.vsix -publishManifest src/publish-manifest.json -ignoreWarnings 'VSIXValidatorWarning01,VSIXValidatorWarning02'