-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathexport-and-branch.yml
61 lines (61 loc) · 2.64 KB
/
export-and-branch.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
name: export-and-branch
on:
workflow_dispatch:
inputs:
#Change this value
solution_name:
description: 'name of the solution to worked on from Power Platform'
required: true
default: Prioritz
#Do Not change these values
solution_exported_folder:
description: 'folder name for staging the exported solution *do not change*'
required: true
default: out/exported/
solution_folder:
description: 'staging the unpacked solution folder before check-in *do not change*'
required: true
default: out/solutions/
solution_target_folder:
description: 'folder name to be created and checked in *do not change*'
required: true
default: solutions/
jobs:
export-from-dev:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
lfs: true
- name: Install Power Platform Tools
uses: microsoft/powerplatform-actions/actions-install@v1
- name: export-solution action
uses: microsoft/powerplatform-actions/export-solution@v1
with:
environment-url: ${{secrets.PowerPlatformDevUrl}}
user-name: ${{secrets.PowerPlatformAppID}}
password-secret: ${{ secrets.PowerPlatformClientSecret }}
solution-name: ${{ github.event.inputs.solution_name }}
solution-output-file: ${{github.event.inputs.solution_exported_folder}}/${{github.event.inputs.solution_name }}.zip
- name: export-managed-solution action
uses: microsoft/powerplatform-actions/export-solution@v1
with:
environment-url: ${{secrets.PowerPlatformDevUrl}}
user-name: ${{secrets.PowerPlatformAppID}}
password-secret: ${{ secrets.PowerPlatformClientSecret }}
solution-name: ${{ github.event.inputs.solution_name }}
solution-output-file: ${{github.event.inputs.solution_exported_folder}}/${{github.event.inputs.solution_name }}_managed.zip
managed: true
- name: unpack-solution action
uses: microsoft/powerplatform-actions/unpack-solution@v1
with:
solution-file: ${{ github.event.inputs.solution_exported_folder}}/${{github.event.inputs.solution_name }}.zip
solution-folder: ${{ github.event.inputs.solution_folder}}/${{github.event.inputs.solution_name }}
solution-type: 'Both'
- name: branch-solution, prepare it for a PullRequest
uses: microsoft/powerplatform-actions/branch-solution@v1
with:
solution-folder: ${{ github.event.inputs.solution_folder}}/${{github.event.inputs.solution_name }}
solution-target-folder: ${{github.event.inputs.solution_target_folder}}/${{github.event.inputs.solution_name }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-empty-commit: true