gctGenerator/azure-pipelines.yml

43 lines
1 KiB
YAML
Raw Normal View History

trigger:
branches:
include:
- master
pool:
2020-03-04 02:41:09 +09:00
vmImage: 'windows-latest'
2020-03-09 17:49:36 +09:00
variables:
pushChanges: 'No'
steps:
- task: PowerShell@2
2020-03-09 17:49:36 +09:00
displayName: 'Update GCM Archive'
inputs:
2020-03-09 17:49:36 +09:00
targetType: 'filePath'
filePath: './update_gcm_archive.azure.ps1'
failOnStderr: true
2020-03-09 17:49:36 +09:00
workingDirectory: '.'
- task: PowerShell@2
2020-03-09 17:49:36 +09:00
displayName: 'Commit and push 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 commit -m "Update GCM Archive [skip ci]";'
failOnStderr: true
workingDirectory: '.'
- task: PowerShell@2
displayName: 'Push Changes'
2020-03-09 17:49:36 +09:00
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
2020-03-09 17:49:36 +09:00
workingDirectory: '.'