Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion eng/pipelines/templates/steps/publish-cli-winget.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
parameters:
- name: GitHubToken
type: string
default: $(azuresdk-github-pat)
default: $(GH_TOKEN)
displayName: GitHub token

steps:
- template: /eng/pipelines/templates/steps/set-metadata-variables.yml

- template: /eng/common/pipelines/templates/steps/login-to-github.yml

Comment thread
chidozieononiwu marked this conversation as resolved.
- pwsh: |
$PSNativeCommandArgumentPassing = 'Legacy'
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
Expand Down
11 changes: 8 additions & 3 deletions eng/pipelines/templates/steps/publish-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ parameters:

steps:
- ${{ if eq('true', parameters.CreateGitHubRelease) }}:
- template: /eng/common/pipelines/templates/steps/login-to-github.yml
parameters:
TokenOwners:
- ${{ split(variables['Build.Repository.Name'], '/')[0] }}

# This step must run first because a duplicated tag means we don't need to
# continue with any of the subsequent steps.
- pwsh: |
Expand All @@ -32,7 +37,7 @@ steps:
exit 0
displayName: Check for existing GitHub release
env:
GH_TOKEN: $(azuresdk-github-pat)
GH_TOKEN: $(GH_TOKEN)

- pwsh: |
Remove-Item -Path release/_manifest -Recurse -Force
Expand All @@ -50,7 +55,7 @@ steps:
gh release upload $(GH_RELEASE_TAG) release/* --repo $(Build.Repository.Name)
displayName: Create GitHub Release and upload artifacts
env:
GH_TOKEN: $(azuresdk-github-pat)
GH_TOKEN: $(GH_TOKEN)

- pwsh: |
$goModuleTag = "cli/azd/v$(CLI_VERSION)"
Expand Down Expand Up @@ -115,7 +120,7 @@ steps:
Write-Host "Successfully created tag: $goModuleTag"
displayName: Create Go module version tag
env:
GH_TOKEN: $(azuresdk-github-pat)
GH_TOKEN: $(GH_TOKEN)

- ${{ if eq('true', parameters.UploadInstaller) }}:
- pwsh: |
Expand Down
9 changes: 7 additions & 2 deletions eng/pipelines/templates/steps/publish-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ parameters:
type: string

steps:
- template: /eng/common/pipelines/templates/steps/login-to-github.yml
parameters:
TokenOwners:
- ${{ split(variables['Build.Repository.Name'], '/')[0] }}

# This step must run first because a duplicated tag means we don't need to
# continue with any of the subsequent steps.
- pwsh: |
Expand All @@ -36,7 +41,7 @@ steps:
exit 0
displayName: Check for existing GitHub release
env:
GH_TOKEN: $(azuresdk-github-pat)
GH_TOKEN: $(GH_TOKEN)

- pwsh: |
Remove-Item -Path release/_manifest -Recurse -Force
Expand All @@ -62,7 +67,7 @@ steps:
gh release upload $(GH_RELEASE_TAG) release/* --repo $(Build.Repository.Name)
displayName: Create GitHub Release and upload artifacts
env:
GH_TOKEN: $(azuresdk-github-pat)
GH_TOKEN: $(GH_TOKEN)

- task: AzurePowerShell@5
displayName: Upload release to storage account
Expand Down
7 changes: 6 additions & 1 deletion eng/pipelines/templates/steps/set-git-credentials.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
parameters:
Username: azure-sdk
Email: azuresdk@microsoft.com
GitHubPat: $(azuresdk-github-pat)
GitHubPat: $(GH_TOKEN)

steps:
- template: /eng/common/pipelines/templates/steps/login-to-github.yml
parameters:
TokenOwners:
- ${{ parameters.Username }}

Comment on lines +7 to +11
- pwsh: |
git config --global user.name "${{ parameters.Username }}"
git config --global user.email "${{ parameters.Email }}"
Expand Down
7 changes: 6 additions & 1 deletion eng/pipelines/templates/steps/update-prcomment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ parameters:
default: '<!-- #not-specified -->'
- name: GitHubToken
type: string
default: $(azuresdk-github-pat)
default: $(GH_TOKEN)

steps:
- template: /eng/common/pipelines/templates/steps/login-to-github.yml
parameters:
TokenOwners:
- ${{ split(parameters.Repo, '/')[0] }}

- pwsh: |
$Repo = "${{ parameters.Repo }}"
$PrNumber = "${{ parameters.PrNumber }}"
Expand Down
Loading