45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
trigger:
|
|
branches:
|
|
include:
|
|
- master
|
|
|
|
pr: none
|
|
|
|
pool:
|
|
vmImage: 'windows-latest'
|
|
|
|
variables:
|
|
pushChanges: 'No'
|
|
|
|
steps:
|
|
- task: PowerShell@2
|
|
displayName: 'Update archives'
|
|
inputs:
|
|
targetType: 'filePath'
|
|
filePath: './update_archives.azure.ps1'
|
|
failOnStderr: true
|
|
workingDirectory: '.'
|
|
- task: PowerShell@2
|
|
displayName: 'Commit changes'
|
|
condition: and(succeeded(), eq(variables.pushChanges, 'Yes'))
|
|
inputs:
|
|
targetType: 'inline'
|
|
script: '$ErrorActionPreference = "Stop";
|
|
git config --local user.name "BotPatty";
|
|
git config --local user.email "ci@zint.ch";
|
|
git add ./files/GCMCodes.zip;
|
|
git add ./files/DolphinCodes.zip;
|
|
git commit -m "update archives [skip ci]";'
|
|
failOnStderr: true
|
|
workingDirectory: '.'
|
|
- task: PowerShell@2
|
|
displayName: 'Push Changes'
|
|
condition: and(succeeded(), eq(variables.pushChanges, 'Yes'))
|
|
env:
|
|
GitHub_PAT: $(GitHub_PAT)
|
|
inputs:
|
|
targetType: 'inline'
|
|
script: '$ErrorActionPreference = "Stop";
|
|
git push -q $(GitHub_PAT) HEAD:master;'
|
|
failOnStderr: true
|
|
workingDirectory: '.'
|