From 65d3adc56e9f6db355aa38cd3a142ccaddf8e427 Mon Sep 17 00:00:00 2001 From: Andy Jordan <2226434+andyleejordan@users.noreply.github.com> Date: Tue, 13 Feb 2024 09:58:42 -0800 Subject: [PATCH] Add Azure NPM registry to CI test workflow --- .github/workflows/ci-test.yml | 2 ++ .vsts-ci/templates/publish-markets.yml | 2 +- vscode-powershell.build.ps1 | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 5b957f160e..d14454a97c 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -61,6 +61,8 @@ jobs: - name: Build, test and package shell: pwsh run: Invoke-Build + env: + NPM_AUTH_TOKEN: ${{ secrets.AZURE_NPM_TOKEN }} - name: Upload build artifacts uses: actions/upload-artifact@v4 diff --git a/.vsts-ci/templates/publish-markets.yml b/.vsts-ci/templates/publish-markets.yml index 0cadb54960..16f686a5ae 100644 --- a/.vsts-ci/templates/publish-markets.yml +++ b/.vsts-ci/templates/publish-markets.yml @@ -10,7 +10,7 @@ steps: workingFile: .npmrc - pwsh: | - npm ci --loglevel=error + npm ci --loglevel=error --ignore-scripts Import-Module $(Build.SourcesDirectory)/tools/VersionTools.psm1 $Version = Get-Version -RepositoryName vscode-powershell $PackageVersion = Get-MajorMinorPatch -Version $Version diff --git a/vscode-powershell.build.ps1 b/vscode-powershell.build.ps1 index bdca9c9700..ad75b91bbf 100644 --- a/vscode-powershell.build.ps1 +++ b/vscode-powershell.build.ps1 @@ -26,8 +26,8 @@ task RestoreNodeModules -If { !(Test-Path ./node_modules) } { Write-Host "`n### Restoring vscode-powershell dependencies`n" -ForegroundColor Green # When in a CI build use the --loglevel=error parameter so that # package install warnings don't cause PowerShell to throw up - if ($env:TF_BUILD) { - Invoke-BuildExec { & npm ci --loglevel=error } + if ($env:CI -or $env:TF_BUILD) { + Invoke-BuildExec { & npm ci --loglevel=error --ignore-scripts } } else { Invoke-BuildExec { & npm install } }