This three part tutorial will give you an opportunity to get hands on with best practices to automate building and deploying your app using GitHub Actions for Power Platform. The first two tutorials are all about setting up required environments and creating a solution to later use with GitHub Actions. If you are experienced with creating environments and solutions, you can follow the Tip below and skip to the third tutorial to begin using GitHub Actions for Power Platform.
- (1) Create three Microsoft Dataverse environments in your tenant
- (2) Create a model-driven app
- (3) Export and deploy your app using application lifecycle management (ALM) automation
Tip
If you are already familiar with the concept of multiple Dataverse environments as well as how to use solutions to package your app, simply download and use the sample ALMLab solution and then skip to the last tutorialof this series.
Let's get started with tutorial #1 and create three Dataverse environments.
Create required environments
You will need to create, or have access to, three Dataverse environments in your demo or customer tenant. To create these environments, follow the instructions below. Otherwise, proceed to the end of this tutorial for the next steps.
-
Sign in to the Power Platform admin center with credentials that provide access to a tenant with a minimum 3 GB available capacity (required to create the three environments).
-
Select Environments in the navigation area.
-
Select + New to create your first new environment.
-
The first environment should be named “Your Name – dev”, set the region to United States (default), set the environment type to Production (if available), if not use Trial.
-
Select Yes to create a database and then Next.
-
Set the currency to USD and language to English. Include the sample apps and data, provide a URL for your business organization, and then select Save.
-
Your development environment has been created, follow steps 4 – 8 above to create a second environment called “Your Name – build” , and then create a third environment called “Your Name – prod”. Note that the third environment can be a trial environment type.
You now have the development, build, and production environments needed in the following modules of this tutorial.
Tutorial: Build a model-driven app for deployment using GitHub Actions for Microsoft Power Platform
In this tutorial, you will be creating a simple model-driven app to deploy using GitHub Actions for Microsoft Power Platform in the next tutorial.
- Create a model-driven app
In the next tutorial, you will learn how to:
- Export and deploy your app using application lifecycle management (ALM) automation
Build a model-driven app
Follow the steps below to build a model-driven app.
-
In your browser, navigate to https://make.powerapps.com and sign in with your credentials. Click the environment selector dropdown in the header and select your development environment.
-
Click the Solutions area in the left navigation, and then click the New solution button to create a new solution.
-
In the side panel that appears, enter a name for the application and click the dropdown for the publisher, and then click the Add Publisher option.
Note
The solution publisher specifies who developed the app, so you should always create a solution publisher name that is meaningful. Furthermore, the solution publisher includes a prefix, which helps you distinguish system components or components introduced by others and is also a mechanism to help avoid naming collisions. This allows for solutions from different publishers to be installed in an environment with minimal conflicts.
-
A new window will be displayed. If a window does not open, check your browser's popup blocker settings. For the purposes of this lab, enter 'ALMLab' for the display name, name, and prefix, and then choose Save and Close.
-
On the new solution panel, select the publisher that you just created, give the application a version number, and select Create to create a new unmanaged solution in the environment.
-
In the solutions list, select the solution you just created and click the Edit button.
-
Your new solution will be empty, and you need to add components to it. In this tutorial we will create a custom entity. Click the New dropdown from the top navigation and then select Entity.
-
Enter a display name and plural name for the entity. The system will fill out the entity name and other fields for you. Click Create to create the entity.
-
Once your entity is created, select the solution name again to go back to the solution view to add another component.
-
Click the New dropdown, then App, and Model-driven app.
-
Enter an application name, and then click the Done button.
-
In the application designer, click the Site Map to edit it.
-
In the sitemap editor, select New Subarea to get its current properties.
-
Select the Entity dropdown and select your custom entity to add to the sitemap.
-
Click Save, Publish, and then Save And Close to go back to the application designer.
-
Click Save, and then Validate to validate the application.
-
You should see one warning. View the warning, select Publish, and then Play.
-
You should now see how the application you just built looks. You can use the application and close its tab when you are satisfied.