Skip to content

.github/workflows/export-and-branch.yml #1

.github/workflows/export-and-branch.yml

.github/workflows/export-and-branch.yml #1

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: export-solution action
uses: microsoft/powerplatform-actions/export-solution@v0
with:
environment-url: ${{secrets.PowerPlatformDevUrl}}
app-id: ${{secrets.PowerPlatformAppID}}
client-secret: ${{ secrets.PowerPlatformClientSecret }}
tenant-id: ${{secrets.PowerPlatformTenantID}}
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@v0
with:
environment-url: ${{secrets.PowerPlatformDevUrl}}
app-id: ${{secrets.PowerPlatformAppID}}
client-secret: ${{ secrets.PowerPlatformClientSecret }}
tenant-id: ${{secrets.PowerPlatformTenantID}}
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@v0
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@v0
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