-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpublish-extension.yml
More file actions
46 lines (41 loc) · 1.62 KB
/
publish-extension.yml
File metadata and controls
46 lines (41 loc) · 1.62 KB
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
parameters:
- name: publish_pat
displayName: PAT with scope Marketplace.Publish
type: string
- name: package_name
displayName: Name of Artifact VISX package
type: string
- name: share_with_orgs
displayName: AzDO Organisations to share extension with
type: string
- name: target_env
displayName: targeted System of deployment
type: string
jobs:
- deployment: publish
displayName: 'Publish Extension to Visual Studio Marketplace'
pool:
name: Azure Pipelines
vmImage: 'ubuntu-latest'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
environment: ${{ parameters.target_env }}
# Publish Extension
strategy:
runOnce:
deploy:
steps:
# Donwload VSIX artifact to $(Pipeline.Workspace)
- download: current
artifact: VSIX
# Install dependencies
- script: npm install tfx-cli
displayName: Install tfx cli tool
failOnStderr: false
# Publish Extension
- script: |
echo "export NODE_NO_WARNINGS=1"
export NODE_NO_WARNINGS=1
echo "npx tfx extension publish --token ${{ parameters.publish_pat }} --share-with ${{ parameters.share_with_orgs }} --vsix $(Pipeline.Workspace)/VSIX/${{ parameters.package_name }}.vsix"
npx tfx extension publish --token ${{ parameters.publish_pat }} --share-with ${{ parameters.share_with_orgs }} --vsix $(Pipeline.Workspace)/VSIX/${{ parameters.package_name }}.vsix
displayName: Publish to Marketplace
failOnStderr: true