-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5536197
commit 8ffe000
Showing
2 changed files
with
31 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,55 +4,8 @@ name: release-solution-to-prod-manual | |
# upload the solution to the GitHub artifacts and deploy to the PROD environment | ||
# Useful trigger types [workflow_call, workflow_dispatch] | ||
on: | ||
workflow_call: | ||
inputs: | ||
# Change this value | ||
solution_name: | ||
required: false | ||
type: string | ||
#Do Not change these values | ||
solution_shipping_folder: | ||
required: false | ||
type: string | ||
solution_outbound_folder: | ||
required: false | ||
type: string | ||
solution_source_folder: | ||
required: false | ||
type: string | ||
solution_release_folder: | ||
required: false | ||
type: string | ||
|
||
workflow_dispatch: | ||
inputs: | ||
# Change this value | ||
solution_name: | ||
description: 'name of the solution to worked on from Power Platform' | ||
required: false | ||
default: FedExDemo | ||
type: string | ||
#Do Not change these values | ||
solution_shipping_folder: | ||
description: 'folder name for staging the exported solution *do not change*' | ||
required: false | ||
default: out/ship/ | ||
type: string | ||
solution_outbound_folder: | ||
description: 'staging the unpacked solution folder before check-in *do not change*' | ||
required: false | ||
default: out/solutions/ | ||
type: string | ||
solution_source_folder: | ||
description: 'folder name to be created and checked in *do not change*' | ||
required: false | ||
default: solutions/ | ||
type: string | ||
solution_release_folder: | ||
description: 'folder where the released binaries are going to be hosted *do not change*' | ||
required: false | ||
default: out/release | ||
type: string | ||
release: | ||
types: [created] | ||
|
||
env: | ||
#edit your values here | ||
|
@@ -61,6 +14,11 @@ env: | |
CLIENT_ID: ${{ secrets.APPLICATION_ID }} | ||
TENANT_ID: ${{ secrets.TENANT_ID }} | ||
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | ||
SOLUTION_NAME: Demo | ||
SOLUTION_SHIPPING_FOLDER: out/ship/ | ||
SOLUTION_OUTBOUND_FOLDER: out/solutions/ | ||
SOLUTION_SOURCE_FOLDER: solutions/ | ||
SOLUTION_RELEASE_FOLDER: out/release | ||
|
||
jobs: | ||
convert-to-managed: | ||
|
@@ -72,7 +30,7 @@ jobs: | |
- uses: actions/checkout@v2 | ||
with: | ||
lfs: true | ||
|
||
- name: who-am-i action | ||
uses: microsoft/powerplatform-actions/[email protected] | ||
with: | ||
|
@@ -81,22 +39,40 @@ jobs: | |
client-secret: ${{ env.CLIENT_SECRET }} | ||
tenant-id: ${{ env.TENANT_ID }} | ||
|
||
- name: Pack solution | ||
uses: microsoft/powerplatform-actions/[email protected] | ||
with: | ||
solution-folder: ${{ env.SOLUTION_SOURCE_FOLDER}}/${{ env.SOLUTION_NAME }} | ||
solution-file: ${{ env.SOLUTION_OUTBOUND_FOLDER}}/${{ env.SOLUTION_NAME }}.zip | ||
solution-type: Unmanaged | ||
|
||
- name: Import solution as unmanaged to build env | ||
uses: microsoft/powerplatform-actions/[email protected] | ||
with: | ||
environment-url: ${{env.BUILD_ENVIRONMENT_URL}} | ||
app-id: ${{env.CLIENT_ID}} | ||
client-secret: ${{ env.CLIENT_SECRET}} | ||
tenant-id: ${{env.TENANT_ID}} | ||
solution-file: ${{ env.SOLUTION_OUTBOUND_FOLDER}}/${{ env.SOLUTION_NAME }}.zip | ||
force-overwrite: true | ||
publish-changes: true | ||
|
||
- name: Export solution as unmanaged | ||
uses: microsoft/powerplatform-actions/[email protected] | ||
with: | ||
environment-url: ${{env.BUILD_ENVIRONMENT_URL}} | ||
app-id: ${{env.CLIENT_ID}} | ||
client-secret: ${{ env.CLIENT_SECRET}} | ||
tenant-id: ${{env.TENANT_ID}} | ||
solution-name: ${{ github.event.inputs.solution_name}} | ||
solution-name: ${{ env.SOLUTION_NAME}} | ||
managed: true | ||
solution-output-file: ${{ github.event.inputs.solution_shipping_folder}}/${{ github.event.inputs.solution_name }}.zip | ||
solution-output-file: ${{ env.SOLUTION_SHIPPING_FOLDER}}/${{ env.SOLUTION_NAME }}.zip | ||
|
||
- name: Upload the ready to ship solution to GH artifact store | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: managedSolutions | ||
path: ${{ github.event.inputs.solution_shipping_folder}}/${{ github.event.inputs.solution_name }}.zip | ||
path: ${{ env.SOLUTION_SHIPPING_FOLDER}}/${{ env.SOLUTION_NAME }}.zip | ||
|
||
release-to-staging: | ||
needs: [ convert-to-managed ] | ||
|
@@ -113,14 +89,14 @@ jobs: | |
uses: actions/download-artifact@v2 | ||
with: | ||
name: managedSolutions | ||
path: ${{ github.event.inputs.solution_release_folder}} | ||
path: ${{ env.SOLUTION_RELEASE_FOLDER}} | ||
- name: Import solution to prod env | ||
uses: microsoft/powerplatform-actions/[email protected] | ||
with: | ||
environment-url: ${{env.PRODUCTION_ENVIRONMENT_URL}} | ||
app-id: ${{env.CLIENT_ID}} | ||
client-secret: ${{ env.CLIENT_SECRET }} | ||
tenant-id: ${{env.TENANT_ID}} | ||
solution-file: ${{ github.event.inputs.solution_release_folder}}/${{ github.event.inputs.solution_name }}.zip | ||
solution-file: ${{ env.SOLUTION_RELEASE_FOLDER}}/${{ env.SOLUTION_NAME }}.zip | ||
force-overwrite: true | ||
publish-changes: true |
This file was deleted.
Oops, something went wrong.