Skip to content

Commit c941811

Browse files
authored
add sample workflows as running workflows (#5)
* add sample workflows as running workflows * allow for empty commits
1 parent f66ed5c commit c941811

File tree

6 files changed

+238
-102
lines changed

6 files changed

+238
-102
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: export-and-branch-solution
2+
# Export solution from DEV environment
3+
# unpack it and prepare, commit and push a git branch with the changes
4+
5+
on:
6+
push:
7+
branches: [ main ]
8+
pull_request:
9+
branches: [ main ]
10+
11+
jobs:
12+
export-from-dev:
13+
runs-on: windows-latest
14+
env:
15+
RUNNER_DEBUG: 1
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
lfs: true
21+
22+
- name: who-am-i action
23+
uses: microsoft/powerplatform-actions/[email protected]
24+
with:
25+
environment-url: 'https://user9-dev.crm.dynamics.com/'
26+
user-name: '[email protected]'
27+
password-secret: ${{ secrets.password }}
28+
29+
- name: export-solution action
30+
uses: microsoft/powerplatform-actions/[email protected]
31+
with:
32+
environment-url: 'https://user9-dev.crm.dynamics.com/'
33+
user-name: '[email protected]'
34+
password-secret: ${{ secrets.password }}
35+
solution-name: ALMLab
36+
solution-output-file: out/exported/ALMLab.zip
37+
38+
- name: unpack-solution action
39+
uses: microsoft/powerplatform-actions/[email protected]
40+
with:
41+
solution-file: out/exported/ALMLab.zip
42+
solution-folder: out/solutions/ALMLab
43+
solution-type: 'Unmanaged'
44+
overwrite-files: true
45+
46+
- name: branch-solution, prepare it for a PullRequest
47+
uses: microsoft/powerplatform-actions/[email protected]
48+
with:
49+
solution-folder: out/solutions/ALMLab
50+
solution-target-folder: solutions/ALMLab
51+
repo-token: ${{ secrets.GITHUB_TOKEN }}
52+
allow-empty-commit: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: release-solution-to-prod
2+
# prepare for releasing to prod:
3+
# convert solution to managed (using a build PowerPlatform environment for the conversion)
4+
# upload the solution to the GitHub artifacts and deploy to the PROD environment
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
convert-to-managed:
12+
runs-on: windows-latest
13+
env:
14+
RUNNER_DEBUG: 1
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
with:
19+
lfs: true
20+
21+
- name: Pack solution
22+
uses: microsoft/powerplatform-actions/[email protected]
23+
with:
24+
solution-folder: solutions/ALMLab
25+
solution-file: out/solutions/ALMLab.zip
26+
solution-type: Unmanaged
27+
28+
- name: Import solution as unmanaged to build env
29+
uses: microsoft/powerplatform-actions/[email protected]
30+
with:
31+
environment-url: 'https://user9-build.crm.dynamics.com/'
32+
user-name: '[email protected]'
33+
password-secret: ${{ secrets.password }}
34+
solution-file: out/solutions/ALMLab.zip
35+
force-overwrite: true
36+
publish-changes: true
37+
38+
- name: Export solution as managed
39+
uses: microsoft/powerplatform-actions/[email protected]
40+
with:
41+
environment-url: 'https://user9-build.crm.dynamics.com/'
42+
user-name: '[email protected]'
43+
password-secret: ${{ secrets.password }}
44+
solution-name: ALMLab
45+
managed: true
46+
solution-output-file: out/ship/ALMLab.zip
47+
48+
- name: Upload the ready to ship solution to GH artifact store
49+
uses: actions/upload-artifact@v2
50+
with:
51+
name: managedSolutions
52+
path: out/ship/ALMLab.zip
53+
54+
release-to-staging:
55+
needs: [ convert-to-managed ]
56+
runs-on: windows-latest
57+
env:
58+
RUNNER_DEBUG: 1
59+
60+
steps:
61+
- uses: actions/checkout@v2
62+
with:
63+
lfs: true
64+
65+
- name: Fetch the ready to ship solution from GH artifact store
66+
uses: actions/download-artifact@v2
67+
with:
68+
name: managedSolutions
69+
path: out/release/
70+
71+
- run: get-childitem .\out\release\
72+
73+
- name: Import solution to prod env
74+
uses: microsoft/powerplatform-actions/[email protected]
75+
with:
76+
environment-url: 'https://user9-prod.crm.dynamics.com/'
77+
user-name: '[email protected]'
78+
password-secret: ${{ secrets.password }}
79+
solution-file: out/release/ALMLab.zip
80+
force-overwrite: true
81+
publish-changes: true

ALMLab_1_0_0_1.zip

-7.91 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
1-
# GitHub workflow to generate managed solution (build artifact)
2-
name: convert-to-managed
3-
4-
on:
5-
pull_request:
6-
branches: [ main ]
7-
release:
8-
types: [created]
9-
10-
jobs:
11-
build:
12-
runs-on: windows-latest
13-
env:
14-
RUNNER_DEBUG: 1
15-
16-
steps:
17-
- uses: actions/checkout@v2
18-
with:
19-
lfs: true
20-
21-
- name: Pack solution
22-
uses: microsoft/powerplatform-actions/pack-solution@v0
23-
with:
24-
solution-folder: 'solutions/ALMLab-staged'
25-
solution-file: out/CI/solutions/ALMLab.zip
26-
solution-type: Unmanaged
27-
28-
- name: Import solution as unmanaged to build env
29-
uses: microsoft/powerplatform-actions/import-solution@v0
30-
with:
31-
environment-url: '<BUILDENVIRONMENT'
32-
user-name: '<USERNAME>'
33-
password-secret: ${{ secrets.password }}
34-
solution-file: 'out/CI/solutions/ALMLab.zip'
35-
force-overwrite: true
36-
publish-changes: true
37-
38-
- name: Export solution as managed
39-
uses: microsoft/powerplatform-actions/export-solution@v0
40-
with:
41-
environment-url: '<BUILDENVIRONMENT>'
42-
user-name: '<USERNAME>'
43-
password-secret: ${{ secrets.password }}
44-
solution-name: ALMLab
45-
managed: true
46-
solution-output-file: out/ship/ALMLab.zip
47-
48-
- name: Upload the ready to ship solution to GH artifact store
49-
uses: actions/upload-artifact@v2
50-
with:
51-
name: managedSolutions
1+
# GitHub workflow to generate managed solution (build artifact)
2+
name: convert-to-managed
3+
4+
on:
5+
pull_request:
6+
branches: [ main ]
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
build:
12+
runs-on: windows-latest
13+
env:
14+
RUNNER_DEBUG: 1
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
with:
19+
lfs: true
20+
21+
- name: Pack solution
22+
uses: microsoft/powerplatform-actions/pack-solution@v0
23+
with:
24+
solution-folder: 'solutions/ALMLab-staged'
25+
solution-file: out/CI/solutions/ALMLab.zip
26+
solution-type: Unmanaged
27+
28+
- name: Import solution as unmanaged to build env
29+
uses: microsoft/powerplatform-actions/import-solution@v0
30+
with:
31+
environment-url: '<BUILDENVIRONMENT'
32+
user-name: '<USERNAME>'
33+
password-secret: ${{ secrets.password }}
34+
solution-file: 'out/CI/solutions/ALMLab.zip'
35+
force-overwrite: true
36+
publish-changes: true
37+
38+
- name: Export solution as managed
39+
uses: microsoft/powerplatform-actions/export-solution@v0
40+
with:
41+
environment-url: '<BUILDENVIRONMENT>'
42+
user-name: '<USERNAME>'
43+
password-secret: ${{ secrets.password }}
44+
solution-name: ALMLab
45+
managed: true
46+
solution-output-file: out/ship/ALMLab.zip
47+
48+
- name: Upload the ready to ship solution to GH artifact store
49+
uses: actions/upload-artifact@v2
50+
with:
51+
name: managedSolutions
5252
path: out/ship/ALMLab.zip
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
1-
# GitHub workflow to generate export a solution from an environment and unpack it to a new branch
2-
name: export
3-
on:
4-
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
8-
jobs:
9-
build:
10-
runs-on: windows-latest
11-
env:
12-
RUNNER_DEBUG: 1
13-
steps:
14-
- uses: actions/checkout@v2
15-
with:
16-
lfs: true
17-
- name: who-am-i action
18-
# uses: microsoft/powerplatform-actions/who-am-i@v0
19-
uses: ./microsoft/powerplatform-actions/who-am-i
20-
with:
21-
environment-url: '<ENVIRONMENTURL>'
22-
user-name: '<USERNAME>'
23-
password-secret: ${{ secrets.password }}
24-
- name: export-solution action
25-
# uses: microsoft/powerplatform-actions/export-solution@v0
26-
uses: ./microsoft/powerplatform-actions/export-solution
27-
with:
28-
environment-url: '<ENVIRONMENTURL>'
29-
user-name: '<USERNAME>'
30-
password-secret: ${{ secrets.password }}
31-
solution-name: ALMLab
32-
solution-output-file: 'ALMLab.zip'
33-
working-directory: 'out/CI'
34-
- name: unpack-solution action
35-
# uses: microsoft/powerplatform-actions/unpack-solution@v0
36-
uses: ./microsoft/powerplatform-actions/unpack-solution
37-
with:
38-
solution-file: 'out/CI/ALMLab.zip'
39-
solution-folder: 'out/CI/solutions/ALMLab'
40-
solution-type: 'Unmanaged'
41-
overwrite-files: true
42-
- name: branch-solution for Covid19Screening
43-
# uses: microsoft/powerplatform-actions/branch-solution@v0
44-
uses: ./microsoft/powerplatform-actions/branch-solution
45-
with:
46-
solution-folder: 'out/CI/solutions/Covid19Screening'
47-
solution-target-folder: 'solutions/Covid19Screening'
48-
repo-token: ${{ secrets.GITHUB_TOKEN }}
49-
- name: List Covid19Screening solution
50-
run: |
51-
cmd /c "dir /s /b out\CI\solutions\ALMLAB"
1+
# GitHub workflow to generate export a solution from an environment and unpack it to a new branch
2+
name: export
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
jobs:
9+
build:
10+
runs-on: windows-latest
11+
env:
12+
RUNNER_DEBUG: 1
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
lfs: true
17+
- name: who-am-i action
18+
# uses: microsoft/powerplatform-actions/who-am-i@v0
19+
uses: ./microsoft/powerplatform-actions/who-am-i
20+
with:
21+
environment-url: '<ENVIRONMENTURL>'
22+
user-name: '<USERNAME>'
23+
password-secret: ${{ secrets.password }}
24+
- name: export-solution action
25+
# uses: microsoft/powerplatform-actions/export-solution@v0
26+
uses: ./microsoft/powerplatform-actions/export-solution
27+
with:
28+
environment-url: '<ENVIRONMENTURL>'
29+
user-name: '<USERNAME>'
30+
password-secret: ${{ secrets.password }}
31+
solution-name: ALMLab
32+
solution-output-file: 'ALMLab.zip'
33+
working-directory: 'out/CI'
34+
- name: unpack-solution action
35+
# uses: microsoft/powerplatform-actions/unpack-solution@v0
36+
uses: ./microsoft/powerplatform-actions/unpack-solution
37+
with:
38+
solution-file: 'out/CI/ALMLab.zip'
39+
solution-folder: 'out/CI/solutions/ALMLab'
40+
solution-type: 'Unmanaged'
41+
overwrite-files: true
42+
- name: branch-solution for Covid19Screening
43+
# uses: microsoft/powerplatform-actions/branch-solution@v0
44+
uses: ./microsoft/powerplatform-actions/branch-solution
45+
with:
46+
solution-folder: 'out/CI/solutions/Covid19Screening'
47+
solution-target-folder: 'solutions/Covid19Screening'
48+
repo-token: ${{ secrets.GITHUB_TOKEN }}
49+
- name: List Covid19Screening solution
50+
run: |
51+
cmd /c "dir /s /b out\CI\solutions\ALMLAB"

solutions/ALMLab_1_0_0_1.zip

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:42c1889fc8651361a96ad71d99e322e559ef25b9f60020b7cd3507073cd46423
3+
size 8101

0 commit comments

Comments
 (0)