2024-03-15 01:09:21 +03:00
|
|
|
parameters:
|
|
|
|
pool: ''
|
2024-08-12 21:04:24 +03:00
|
|
|
SignType: ''
|
2024-03-15 01:09:21 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
- job: ${{ parameters.pool.os }}_Package
|
|
|
|
pool:
|
|
|
|
${{ if eq(parameters.useOneEngineeringPool, 'true') }}:
|
|
|
|
${{ parameters.pool }}
|
|
|
|
${{ else }}:
|
|
|
|
vmImage: ${{ parameters.pool.vmImage }}
|
|
|
|
displayName: '📦 Package and Publish'
|
|
|
|
dependsOn:
|
|
|
|
- ${{ parameters.pool.os }}_Build
|
2024-09-11 07:39:51 +03:00
|
|
|
- ESLint
|
|
|
|
condition: succeeded()
|
2024-03-15 01:09:21 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Runtime:
|
|
|
|
dir-name: 'vscode-dotnet-runtime-extension'
|
|
|
|
package-name: 'vscode-dotnet-runtime'
|
|
|
|
SDK:
|
|
|
|
dir-name: 'vscode-dotnet-sdk-extension'
|
|
|
|
package-name: 'vscode-dotnet-sdk'
|
|
|
|
templateContext:
|
|
|
|
outputs:
|
|
|
|
- output: pipelineArtifact
|
|
|
|
displayName: '📂 Publish .VSIX'
|
|
|
|
targetPath: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
artifactName: '$(dir-name)'
|
|
|
|
steps:
|
|
|
|
- template: install-node.yaml
|
|
|
|
- bash: |
|
|
|
|
if ([ $(is-sdk-release) = 'True' ] && [ $(package-name) = 'vscode-dotnet-sdk' ]) || ([ $(is-runtime-release) = 'True' ] && [ $(package-name) = 'vscode-dotnet-runtime' ]); then
|
|
|
|
VERSION=`node -p "require('./package.json').version"`
|
|
|
|
else
|
|
|
|
VERSION_NUM=`node -p "require('./package.json').version"`
|
2024-08-12 21:04:24 +03:00
|
|
|
VERSION="$VERSION_NUM"
|
2024-03-15 01:09:21 +03:00
|
|
|
fi
|
|
|
|
npm version $VERSION --allow-same-version
|
|
|
|
echo "##vso[task.setvariable variable=version;isOutput=true]$VERSION"
|
|
|
|
name: GetVersion
|
|
|
|
displayName: '❓ Get Version'
|
|
|
|
workingDirectory: $(dir-name)
|
2024-10-15 21:45:42 +03:00
|
|
|
- ${{ if eq(parameters.useOneEngineeringPool, 'true') }}:
|
2024-08-14 23:48:42 +03:00
|
|
|
- template: prepare-signing.yaml
|
|
|
|
parameters:
|
|
|
|
SignType: ${{ parameters.SignType }}
|
2024-03-15 01:09:21 +03:00
|
|
|
- bash: |
|
|
|
|
npm install rimraf --reg https://registry.npmjs.org/ --verbose
|
2024-08-01 01:15:55 +03:00
|
|
|
npm install @vscode/vsce@latest -g --reg https://registry.npmjs.org/ --verbose
|
2024-03-15 01:09:21 +03:00
|
|
|
vsce package -o $(package-name)-$(GetVersion.version).vsix --ignoreFile ../.vscodeignore --yarn
|
2024-08-12 21:04:24 +03:00
|
|
|
cp $(package-name)-$(GetVersion.version).vsix ../packages/$(package-name)-$(GetVersion.version).vsix
|
2024-03-15 01:09:21 +03:00
|
|
|
displayName: 📦 Package Artifact
|
|
|
|
workingDirectory: $(dir-name)
|
2024-08-12 21:04:24 +03:00
|
|
|
env:
|
|
|
|
SignType: ${{ parameters.SignType }}
|
|
|
|
- script: dotnet build msbuild/signVsix -v:normal
|
|
|
|
displayName: 🖊️ Sign VSIXes
|
|
|
|
env:
|
|
|
|
SignType: ${{ parameters.SignType }}
|
|
|
|
- task: CmdLine@2
|
|
|
|
displayName: 🤌 Rename Signed VSIX
|
|
|
|
inputs:
|
|
|
|
script: rename ".\packages\$(package-name)-$(GetVersion.version).vsix" $(package-name)-$(GetVersion.version)-signed.vsix
|
2024-03-15 01:09:21 +03:00
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: '📩 Copy Artifact'
|
|
|
|
inputs:
|
|
|
|
SourceFolder: '$(Build.SourcesDirectory)'
|
|
|
|
Contents: '**\*.vsix'
|
|
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
2024-08-12 21:04:24 +03:00
|
|
|
flattenFolders: true
|
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: '🏗️ Copy Binlog'
|
|
|
|
inputs:
|
|
|
|
SourceFolder: '$(Build.SourcesDirectory)'
|
|
|
|
Contents: '**\*.binlog'
|
|
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
2024-10-15 21:45:42 +03:00
|
|
|
flattenFolders: false
|
|
|
|
- ${{ if eq(parameters.useOneEngineeringPool, 'true') }}:
|
|
|
|
- template: publish.yaml
|
|
|
|
parameters:
|
|
|
|
pool: ${{ parameters.pool }}
|
|
|
|
SignType: ${{ parameters.SignType }}
|
|
|
|
version: $(GetVersion.version)
|
|
|
|
useOneEngineeringPool: true
|