1
+ name : Create Release on Tag
2
+ run-name : BuildTag ${{ github.ref }}
3
+ on :
4
+ push :
5
+ # Sequence of patterns matched against refs/tags
6
+ tags :
7
+ - ' v*' # Push events to matching v*, i.e. v1.0, v20.15.10
8
+
9
+
10
+ env :
11
+ pcfWorkkingDirectory : ' src/broadcast-pcf/appmodulepicker'
12
+ broadcastjsWorkingDirectory : ' src/broadcast-typescript'
13
+ solutionDirectory : ' src/broadcast-solution'
14
+ artifactlocation : ' ${{ github.workspace }}/dist'
15
+ jobs :
16
+ buildBroadCastJs :
17
+ uses : ./.github/workflows/buildjs.yml
18
+ with :
19
+ projectdirectory : ' src/broadcast-typescript'
20
+ componentName : broadcastjs
21
+ publishArtifact : true
22
+ testCommand : ' test:ci'
23
+ publishCodeCov : false
24
+ artifactlocation : ' ${{ github.workspace }}/dist'
25
+ secrets :
26
+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
27
+
28
+
29
+
30
+ buildAppModulePickerPCF :
31
+ uses : ./.github/workflows/buildpcf.yml
32
+ with :
33
+ pcfdirectory : ' src/broadcast-pcf/appmodulepicker'
34
+ publishArtifact : true
35
+ componentName : AppModulePicker
36
+ artifactlocation : ' ${{ github.workspace }}/dist'
37
+ release :
38
+ name : Create Release from tag
39
+ needs : [ buildAppModulePickerPCF, buildBroadCastJs]
40
+ runs-on : ubuntu-latest
41
+ steps :
42
+ - uses : actions/checkout@v4
43
+ with :
44
+ fetch-depth : 0
45
+ - name : Install Power Platform Tools
46
+ uses : microsoft/powerplatform-actions/actions-install@v1
47
+ - name : Install GitVersion
48
+ uses :
gittools/actions/gitversion/[email protected]
49
+ with :
50
+ versionSpec : ' 6.3.x'
51
+ - name : Determine Version
52
+ id : gitversion # step id used as reference for output values
53
+ uses :
gittools/actions/gitversion/[email protected]
54
+
55
+ - name : Download broadcastjs artifact
56
+ uses : actions/download-artifact@v4
57
+ with :
58
+ name : broadcastjs
59
+ path : ' ${{ github.workspace }}/broadcastjs'
60
+ - name : Download AppModulePicker artifact
61
+ uses : actions/download-artifact@v4
62
+ with :
63
+ name : AppModulePicker
64
+ path : ' ${{ github.workspace }}/AppModulePicker'
65
+ - name : Rename broadcastjs/bundle.js into bbundle.js
66
+ run : bundle.js bbundle.js
67
+ working-directory : ${{ github.workspace }}/AppModulePicker
68
+ - name : Update PCF control version with ${{ github.ref }}
69
+
70
+ with :
71
+ args : >-
72
+ ed -L --update "/manifest/control/@version"
73
+ -v "${{ steps.gitversion.outputs.majorMinorPatch }}"
74
+ ${{ github.workspace }}/AppModulePicker/ControlManifest.xml
75
+ - name : Update Solution.xml Version with semver
76
+
77
+ with :
78
+ args : >-
79
+ ed -L --update "/ImportExportXml/SolutionManifest/Version"
80
+ -v "${{ steps.gitversion.outputs.assemblySemVer }}"
81
+ ${{ github.workspace }}/src/broadcast-solution/Other/Solution.xml
82
+ - name : delete bundle.js from the solution directory
83
+ run : |
84
+ rm src/broadcast-solution/Controls/fdn_Broadcast.AppModulePicker/bundle.js
85
+ - name : Pack solution
86
+ uses : microsoft/powerplatform-actions/pack-solution@v1
87
+ with :
88
+ solution-folder : src/broadcast-solution
89
+ map-file : src/solution-mapping-pack.xml
90
+ solution-file : BroadcastSolution_v${{ steps.gitversion.outputs.majorMinorPatch }}.zip
91
+ solution-type : Both
92
+ - name : Create Release
93
+ id : create_release
94
+ uses : actions/create-release@v1
95
+ env :
96
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
97
+ with :
98
+ tag_name : ${{ github.ref }}
99
+ release_name : Release ${{ github.ref }}
100
+ draft : false
101
+ prerelease : false
102
+ - name : Upload Unmanaged Release Solution
103
+ id : upload-release-asset
104
+ uses : actions/upload-release-asset@v1
105
+ env :
106
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
107
+ with :
108
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
109
+ asset_path : ./BroadcastSolution_v${{ steps.gitversion.outputs.majorMinorPatch }}.zip
110
+ asset_name : BroadcastSolution_v${{ steps.gitversion.outputs.majorMinorPatch }}.zip
111
+ asset_content_type : application/zip
112
+ - name : Upload Managed Release Solution
113
+ id : upload-release-managed-asset
114
+ uses : actions/upload-release-asset@v1
115
+ env :
116
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
117
+ with :
118
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
119
+ asset_path : ./BroadcastSolution_v${{ steps.gitversion.outputs.majorMinorPatch }}_Managed.zip
120
+ asset_name : BroadcastSolution_v${{ steps.gitversion.outputs.majorMinorPatch }}_Managed.zip
121
+ asset_content_type : application/zip
122
+
123
+
124
+
125
+
0 commit comments