30
30
- name : Package CLI Tool
31
31
run : dotnet pack --no-build -c Release /p:UseSourceLink=true src/CLI/ApiClientCodeGen.CLI/ApiClientCodeGen.CLI.csproj -p:PackageVersion="${{ env.VERSION }}"
32
32
- name : Push packages to NuGet
33
+ if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/release'
33
34
run : dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_KEY }} --source ${{ env.NUGET_REPO_URL }} --no-symbols true
34
35
continue-on-error : true
35
36
- name : Publish artifacts
77
78
*.vsix
78
79
docs/Marketplace*.md
79
80
- name : Publish VSIX Packages
81
+ if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/release'
80
82
continue-on-error : true
81
83
run : |
82
84
$VsixPublisher = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe"
@@ -131,6 +133,13 @@ jobs:
131
133
with :
132
134
name : VSCode-Extension
133
135
path : src/VSCode/*.vsix
136
+
137
+ - name : Publish to VS Code Marketplace
138
+ if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/release'
139
+ continue-on-error : true
140
+ run : |
141
+ cd src/VSCode
142
+ npx vsce publish -p ${{ secrets.MARKETPLACE_PAT }}
134
143
135
144
Release :
136
145
needs : [
@@ -142,6 +151,7 @@ jobs:
142
151
steps :
143
152
- name : Create tag
144
153
uses : actions/github-script@v7
154
+ if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/release'
145
155
with :
146
156
github-token : ${{ github.token }}
147
157
script : |
@@ -188,6 +198,6 @@ jobs:
188
198
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
189
199
with :
190
200
upload_url : ${{ steps.create-release.outputs.upload_url }}
191
- asset_path : artifacts/VSCode-Extension/rest-api-client-code-generator -${{ env.VERSION }}.vsix
192
- asset_name : rest-api-client-code-generator -${{ env.VERSION }}.vsix
201
+ asset_path : artifacts/VSCode-Extension/apiclientcodegen -${{ env.VERSION }}.vsix
202
+ asset_name : apiclientcodegen -${{ env.VERSION }}.vsix
193
203
asset_content_type : application/zip
0 commit comments