Skip to content

Download tasks

Download tasks #670

Workflow file for this run

# 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
lfs: true
- run: |
Invoke-Expression "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI -quiet"
name: Upgrade to latest preview of powershell
if: false
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 }}