Skip to content

Commit b04fc9a

Browse files
committed
Fixes devops package source settings
1 parent 79e5733 commit b04fc9a

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/build-and-deploy-production.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,18 @@ jobs:
3030

3131
- name: Add TechnologyEnhancedLearning as nuget package source
3232
run: |
33-
$nugetSources = dotnet nuget list source | Out-String;
34-
if(!($nugetSources -like "*TechnologyEnhancedLearning*"))
35-
{
36-
dotnet nuget add source https://pkgs.dev.azure.com/e-LfH/_packaging/LearningHubFeed/nuget/v3/index.json --name TechnologyEnhancedLearning --username 'kevin.whittaker' --password ${{ secrets.AZURE_DEVOPS_PAT }} --store-password-in-clear-text;
37-
}
38-
33+
$nugetSources = dotnet nuget list source | Out-String;
34+
if($nugetSources -like "*TechnologyEnhancedLearning*")
35+
{
36+
# Update the source (in case PAT has been updated)
37+
dotnet nuget update source TechnologyEnhancedLearning --source https://pkgs.dev.azure.com/e-LfH/_packaging/LearningHubFeed/nuget/v3/index.json --username 'kevin.whittaker' --password ${{ secrets.AZURE_DEVOPS_PAT }} --store-password-in-clear-text
38+
}
39+
else
40+
{
41+
# Add the source
42+
dotnet nuget add source https://pkgs.dev.azure.com/e-LfH/_packaging/LearningHubFeed/nuget/v3/index.json --name TechnologyEnhancedLearning --username 'kevin.whittaker' --password ${{ secrets.AZURE_DEVOPS_PAT }} --store-password-in-clear-text
43+
}
44+
3945
- name: Dotnet publish
4046
run: |
4147
dotnet publish DigitalLearningSolutions.sln -c Release -o E:/web/${{env.SitePath}}-NEW

0 commit comments

Comments
 (0)