-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
62 lines (53 loc) · 1.59 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
variables:
- name: moduleName
value: PwshAdobeSign
trigger:
- main
stages:
- stage: Build
jobs:
- job: Build
pool:
vmImage: 'macOS-10.14'
steps:
- checkout: self
clean: true
persistCredentials: true
- template: build-steps.yml
parameters:
moduleName: ${{ variables.moduleName }}
- template: test-stage.yml
parameters:
PS51: true
- stage: Deploy
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
jobs:
- job: Commit_Updated_Manifest
pool:
vmImage: 'macOS-10.14'
steps:
- checkout: self
clean: true
persistCredentials: true
- download: current
artifact: files
- pwsh: |
Move-Item -Path '$(Pipeline.Workspace)/files/${{ variables.moduleName }}.psd1' -Destination '${{ variables.moduleName }}.psd1' -Confirm:$false -Force
git add ${{ variables.moduleName }}.psd1
git -c "user.name=$(Build.RequestedFor)" -c "user.email=$(Build.RequestedForEmail)" commit -m "Updated module version: $(Build.BuildNumber) [skip ci]"
git push origin HEAD:main
workingDirectory: '$(Build.SourcesDirectory)'
- job: Github_Release
dependsOn: Commit_Updated_Manifest
steps:
- task: GithubRelease@0
displayName: 'Create GitHub Release'
inputs:
target: main
gitHubConnection: github.com_RobFaie
repositoryName: telstrapurple/${{ variables.moduleName }}
tagSource: manual
tag: $(Build.BuildNumber)
assets: |
$(Pipeline.Workspace)/zip/*.zip
$(Pipeline.Workspace)/tar/*.tar