-
Notifications
You must be signed in to change notification settings - Fork 0
/
Export.yml
53 lines (51 loc) · 1.87 KB
/
Export.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
trigger: none
pr: none
pool:
vmImage: 'windows-latest'
steps:
- task: PowerPlatformToolInstaller@2
displayName: 'Power Platform Tool Installer '
- task: PowerPlatformPublishCustomizations@2
displayName: Publish Customizations
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: 'DEV'
AsyncOperation: true
MaxAsyncWaitTime: '60'
- task: PowerPlatformExportSolution@2
displayName: Export Solution - Unmanaged
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: 'DEV'
SolutionName: 'ALMDemo'
SolutionOutputFile: '$(Build.ArtifactStagingDirectory)\\ALMDemo.zip'
AsyncOperation: true
MaxAsyncWaitTime: '60'
- task: PowerPlatformExportSolution@2
displayName: Export Solution - Managed
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: 'DEV'
SolutionName: 'ALMDemo'
SolutionOutputFile: '$(Build.ArtifactStagingDirectory)\\ALMDemo_managed.zip'
Managed: true
AsyncOperation: true
MaxAsyncWaitTime: '60'
- task: PowerPlatformUnpackSolution@2
displayName: Unpack unmanaged Solution
inputs:
SolutionInputFile: '$(Build.ArtifactStagingDirectory)\\ALMDemo.zip'
SolutionTargetFolder: '$(build.sourcesdirectory)\PowerPlatform\Solutions\ALMDemo'
SolutionType: 'Both'
- task: CmdLine@2
displayName: Commit to Repo
inputs:
script: |
git config user.email $(Build.RequestedForEmail)
git config user.name "$(Build.RequestedFor)"
git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" fetch
git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" checkout main
git add --all
git commit -m "$(Build.DefinitionName) $(Build.BuildNumber)"
git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" pull origin main
git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin main