/powerplatform-actions

Power Platform GitHub Actions automate common build and deployment tasks related to Power Platform. This includes synchronization of solution metadata (a.k.a. solutions) between development environments and source control, generating build artifacts, deploying to downstream environments, provisioning/de-provisioning of environments, and the ability to perform static analysis checks against your solution using the PowerApps checker service.

Primary LanguageTypeScriptMIT LicenseMIT

Power Platform Actions

PRE-RELEASE SOFTWARE. The software is a pre-release version. It may not work the way a final version of the software will. We may change it for the final, commercial version. We also may not release a commercial version.

This repo provides multiple GitHub Actions for the Power Platform. Each action wraps the existing Power Apps CLI. Detailed documentation on GitHub actions for Power Platform is available here.

Sample workflows and detailed instructions are available in our GitHub actions lab repo but if you are already familiar with GitHub actions and Power Platform solutions, simply add below to your existing workflows; also add the secret MYPASSWORD to your repo's 'Settings' | 'Secrets'

jobs:
  build:

    runs-on: windows-latest   # For now, only Windows runners are supported.

    steps:
    - name: Export Solution
      uses: microsoft/powerplatform-actions/export-solution@v0
      with:
        environment-url: 'https://myenv.crm.dynamics.com'
        user-name: 'me@myenv.onmicrosoft.com'
        password-secret: ${{ secrets.MYPASSWORD }}
        solution-name: aSolution
        solution-output-file: 'aSolution.zip'
        working-directory: 'out'

    - name: Unpack Solution
      uses: microsoft/powerplatform-actions/unpack-solution@v0
      with:
        solution-file: 'out/aSolution1.zip'
        solution-folder: 'out/solutions/solution one'
        solution-type: 'Unmanaged'
        overwrite-files: true

    - name: Publish Solution
      uses: microsoft/powerplatform-actions/publish-solution@v0
      with:
        environment-url: 'https://myenv.crm.dynamics.com'
        user-name: 'me@myenv.onmicrosoft.com'
        password-secret: ${{ secrets.MYPASSWORD }}

    - name: Prepare solution changes for checkin into source control
      uses: microsoft/powerplatform-actions/branch-solution@v0
      with:
        solution-folder: 'out/solutions/solution one'
        solution-target-folder: 'src/solutions/solution1'
        token: ${{ secrets.GITHUB_TOKEN }}

CI

Contributing

PRE-RELEASE SOFTWARE. This project will welcome contributions and suggestions in the near future. But in this early preview stage, we're not ready for contributions.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Setting Up Dev Environment

Windows, macOS or Linux:

Getting Started

Clone, restore modules, build and run:

git clone https://github.com/microsoft/powerplatform-actions.git
cd powerplatform-actions
npm install
gulp

Refreshing actions in dist folder

Run npm run dist and commit and push the updates in the ./dist folder.

Details

CLI command for pac

References

ADAL/MSAL

CustomerEngagement API

Power Platform Environment Admin (BAP)