Download tasks #498
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: Download tasks | |
# Controls when the workflow will run | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "22 2 * * *" | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: windows-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 | |
with: | |
lfs: true | |
- run: | | |
Invoke-Expression "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI -quiet" | |
name: Upgrade to latest preview of powershell | |
shell: powershell | |
# "C:\Program Files\PowerShell\7-preview" >> $env:GITHUB_PATH | |
# https://github.com/PowerShell/PowerShell/issues/17404#issuecomment-1188348379 | |
- run: | | |
.\build.ps1 | |
shell: pwsh | |
env: | |
AZURE_DEVOPS_PAT: ${{ secrets.AZURE_DEVOPS_PAT }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
name: Download tasks and build side-by-side versions. | |
- run: | | |
if (test-path -PathType Leaf ./_vsix/*.vsix) | |
{ | |
& npm install tfx-cli@latest --location=global --no-fund | |
foreach ($vsix in dir ./_vsix/*.vsix) | |
{ | |
$json = (& tfx extension show --token $env:AZURE_MARKETPLACE_PAT --vsix $vsix.FullName --json) | ConvertFrom-Json | |
if (-not ($json.versions -and $json.versions.count -gt 0 -and $vsix.FullName.EndsWith("$($json.versions[0].version).vsix"))) | |
{ | |
& tfx extension publish --vsix $vsix.FullName --token $env:AZURE_MARKETPLACE_PAT | |
} | |
} | |
} | |
shell: pwsh | |
name: Publish extensions | |
env: | |
AZURE_MARKETPLACE_PAT: ${{ secrets.AZURE_MARKETPLACE_PAT }} |