forked from openpotato/openholidaysapi.data
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
34 lines (31 loc) · 950 Bytes
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
pool:
vmImage: 'windows-2022'
variables:
- group: 'github-config'
steps:
- task: ArchiveFiles@2
displayName: 'Create Zip archive'
inputs:
rootFolderOrFile: 'src'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/OpenHolidaysApi.Data.zip'
replaceExistingArchive: true
- task: PublishBuildArtifacts@1
displayName: 'Publish build artifacts'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
- task: PowerShell@2
displayName: 'Push to GitHub'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
inputs:
targetType: 'inline'
script: |
git remote add github https://$(PAT)@github.com/openpotato/openholidaysapi.data.git
git fetch github
git checkout .
git push github HEAD:main
git push --tags github HEAD:main
pwsh: true