Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f73c9ad

Browse files
Add Azure NPM registry to CI test workflow
1 parent ab4f204 commit f73c9ad

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

‎.github/workflows/ci-test.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,19 @@ jobs:
5454
cache: npm
5555
cache-dependency-path: vscode-powershell/package-lock.json
5656

57+
- name: Deploy NPM configuration
58+
shell: pwsh
59+
run: Copy-Item .github/workflows/npmrc .npmrc
60+
5761
- name: Start X virtual framebuffer
5862
if: matrix.os == 'ubuntu-latest'
5963
run: /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
6064

6165
- name: Build, test and package
6266
shell: pwsh
6367
run: Invoke-Build
68+
env:
69+
NPM_AUTH_TOKEN: ${{ secrets.AZURE_NPM_TOKEN }}
6470

6571
- name: Upload build artifacts
6672
uses: actions/upload-artifact@v4

‎.github/workflows/npmrc‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
; This requires NPM_AUTH_TOKEN to be available as a base64 encoded secret, since
2+
; Azure DevOps does not support actual auth tokens.
3+
4+
; begin auth token
5+
//pkgs.dev.azure.com/powershell-rel/PowerShellEditorServices/_packaging/PSESFeed/npm/registry/:username=powershell-rel
6+
//pkgs.dev.azure.com/powershell-rel/PowerShellEditorServices/_packaging/PSESFeed/npm/registry/:_password=${NPM_AUTH_TOKEN}
7+
//pkgs.dev.azure.com/powershell-rel/PowerShellEditorServices/_packaging/PSESFeed/npm/registry/:email=powershell-rel
8+
//pkgs.dev.azure.com/powershell-rel/PowerShellEditorServices/_packaging/PSESFeed/npm/:username=powershell-rel
9+
//pkgs.dev.azure.com/powershell-rel/PowerShellEditorServices/_packaging/PSESFeed/npm/:_password=${NPM_AUTH_TOKEN}
10+
//pkgs.dev.azure.com/powershell-rel/PowerShellEditorServices/_packaging/PSESFeed/npm/:email=powershell-rel
11+
; end auth token
12+
registry=https://pkgs.dev.azure.com/powershell-rel/PowerShellEditorServices/_packaging/PSESFeed/npm/registry/
13+
always-auth=true

‎.vsts-ci/templates/publish-markets.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ steps:
1010
workingFile: .npmrc
1111

1212
- pwsh: |
13-
npm ci --loglevel=error
13+
npm ci --loglevel=error --ignore-scripts
1414
Import-Module $(Build.SourcesDirectory)/tools/VersionTools.psm1
1515
$Version = Get-Version -RepositoryName vscode-powershell
1616
$PackageVersion = Get-MajorMinorPatch -Version $Version

‎vscode-powershell.build.ps1‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ task RestoreNodeModules -If { !(Test-Path ./node_modules) } {
2626
Write-Host "`n### Restoring vscode-powershell dependencies`n" -ForegroundColor Green
2727
# When in a CI build use the --loglevel=error parameter so that
2828
# package install warnings don't cause PowerShell to throw up
29-
if ($env:TF_BUILD) {
30-
Invoke-BuildExec { & npm ci --loglevel=error }
29+
if ($env:CI-or$env:TF_BUILD) {
30+
Invoke-BuildExec { & npm ci --loglevel=error --ignore-scripts }
3131
} else {
3232
Invoke-BuildExec { & npm install }
3333
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /