Skip to content

Commit fa0a534

Browse files
authored
Update github-actions.md
1 parent 849fd47 commit fa0a534

1 file changed

Lines changed: 183 additions & 5 deletions

File tree

hub/apps/publish/msstore-dev-cli/github-actions.md

Lines changed: 183 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
### Step 2
9393

9494
#### For metadata updates
95-
* Before publishing metadata updates for the first time, obtain the base metadata JSON from Partner Center for your app submission. This ensures you start with the correct structure for your app. Create a GitHub Actions workflow under .github/workflows/GetBaseMetadata.yml using the provided snippet:
95+
* Before publishing metadata updates for the first time, obtain the base metadata JSON from Partner Center for your app submission. This ensures you start with the correct structure for your app. So, create a GitHub Actions workflow under .github/workflows/GetBaseMetadata.yml using the provided snippet:
9696

9797
```console
9898
name: GetBaseMetadata
@@ -125,7 +125,11 @@ jobs:
125125

126126
* Run this workflow from the Actions tab in your GitHub repository. Select the relevant workflow and click Run workflow.
127127

128-
:::image type="content" source="../images/github-actions-repo-secret.png" lightbox="../images/github-actions-repo-secret.png" alt-text="A screenshot showing how to add secrets to your repository.":::
128+
:::image type="content" source="../images/github-actions-get-base-metadata-workflow-msix.png" lightbox="../images/github-actions-get-base-metadata-workflow-msix.png" alt-text="A screenshot showing
129+
workflow run process for obtaining base metadata for MSIX app.":::
130+
131+
* Upon completion, the workflow will obtain the metadata for your app in the build logs.
132+
* Copy this and create a metadata.json file in the metadata folder.
129133

130134
* Now, under .github/workflows/, create AppMetadataAutoUpdate.yml using the provided workflow snippet:
131135

@@ -163,12 +167,12 @@ jobs:
163167

164168
* When metadata.json gets updated as part of the CI/CD flow in the metadata folder, it will automatically trigger the AppMetadataAutoUpdate.yml workflow.
165169

166-
The workflow will do the following in the background:
170+
The above workflows will do the following in the background:
167171
* Invoke the GitHub Action (microsoft-store-apppublisher)
168172
* Authenticate your Microsoft Store Partner Center account using the secrets you configured (Tenant ID, Client ID, Client Secret, Seller ID).
169-
* Use the Microsoft Store Developer CLI (msstore) to publish the updated metadata or package to the Microsoft Store.
173+
* Use the Microsoft Store Developer CLI (msstore) to obtain base metadata and publish the updated package or metadata to the Microsoft Store.
170174

171-
For more information on commands, refer [Microsoft Store Developer CLI (MSIX)](https://learn.microsoft.com/en-us/windows/apps/publish/msstore-dev-cli/overview).
175+
For more information on commands, refer [Microsoft Store Developer CLI (MSIX)](https://learn.microsoft.com/en-us/windows/apps/publish/msstore-dev-cli/overview).
172176

173177
### Step 3
174178

@@ -178,5 +182,179 @@ After your GitHub Actions workflow completes successfully, check the Microsoft S
178182

179183
[Add the GitHub Action Workflow](https://docs.github.com/en/actions/tutorials/create-an-example-workflow) to invoke the Microsoft GitHub action (microsoft-store-apppublisher) for publishing package and app metadata updates to store.
180184

185+
### Step 1
186+
187+
#### For package updates
188+
* Before publishing updates for the first time, obtain the base package JSON from Partner Center for your app submission. This ensures you start with the correct structure for your app. So, create a GitHub Actions workflow under .github/workflows/GetBasePackage.yml using the provided snippet:
189+
190+
```console
191+
name: GetBasePackage
192+
193+
on:
194+
workflow_dispatch:
195+
196+
jobs:
197+
build:
198+
runs-on: windows-latest
199+
200+
steps:
201+
- uses: actions/checkout@v3
202+
203+
- uses: microsoft/[email protected]
204+
205+
- name: Configure MSStore CLI
206+
run: |
207+
msstore reconfigure `
208+
--tenantId ${{ secrets.AZURE_AD_TENANT_ID }} `
209+
--sellerId ${{ secrets.SELLER_ID }} `
210+
--clientId ${{ secrets.AZURE_AD_APPLICATION_CLIENT_ID }} `
211+
--clientSecret ${{ secrets.AZURE_AD_APPLICATION_SECRET }}
212+
213+
- name: Get base package info
214+
shell: pwsh
215+
run: |
216+
msstore submission get <Partner center Id>
217+
```
218+
219+
* Run this workflow from the Actions tab in your GitHub repository. Select the relevant workflow and click Run workflow.
220+
221+
:::image type="content" source="../images/github-actions-get-base-package-workflow-exe.png" lightbox="../images/github-actions-get-base-package-workflow-exe.png" alt-text="A screenshot showing
222+
workflow run process for obtaining base package info for EXE app.":::
223+
224+
* Upon completion, the workflow will obtain the package info for your app in the build logs.
225+
* Copy this and create a package.json file in the release folder.
226+
227+
* Now, under .github/workflows/, create AppPackageAutoUpdate.yml using the provided workflow snippet:
228+
229+
```console
230+
name: AppPackageAutoUpdate
231+
232+
on:
233+
push:
234+
paths:
235+
- 'release/package.json'
236+
237+
jobs:
238+
build:
239+
runs-on: windows-latest
240+
241+
steps:
242+
- name: Checkout repository
243+
uses: actions/checkout@v4
244+
245+
- name: Configure Microsoft Store CLI
246+
uses: microsoft/[email protected]
247+
248+
- name: Reconfigure store credentials
249+
run: msstore reconfigure `
250+
--tenantId ${{ secrets.AZURE_AD_TENANT_ID }} `
251+
--sellerId ${{ secrets.SELLER_ID }} `
252+
--clientId ${{ secrets.AZURE_AD_APPLICATION_CLIENT_ID }} `
253+
--clientSecret ${{ secrets.AZURE_AD_APPLICATION_SECRET }}
254+
255+
- name: Update package
256+
run: |-
257+
$updatedPackage = Get-Content -Raw "${{ github.workspace }}/release/package.json"
258+
msstore submission update <Partner center Id> $updatedPackage
259+
- name: Publish Submission
260+
run: |-
261+
msstore submission publish <Partner center Id>
262+
```
263+
264+
* When the package.json is updated as part of the CI/CD flow in the release folder, the AppPackageAutoUpdate.yml workflow is triggered automatically.
265+
266+
### Step 2
267+
268+
#### For metadata updates
269+
* Next, for metadata, obtain the base metadata JSON from Partner Center for your app submission by creating a GitHub Actions workflow under .github/workflows/GetBaseMetadata.yml using the provided snippet:
270+
271+
```console
272+
name: GetBaseMetadata
273+
274+
on:
275+
workflow_dispatch:
276+
277+
jobs:
278+
build:
279+
runs-on: windows-latest
280+
281+
steps:
282+
- uses: actions/checkout@v3
283+
284+
- uses: microsoft/[email protected]
285+
286+
- name: Configure MSStore CLI
287+
run: |
288+
msstore reconfigure `
289+
--tenantId ${{ secrets.AZURE_AD_TENANT_ID }} `
290+
--sellerId ${{ secrets.SELLER_ID }} `
291+
--clientId ${{ secrets.AZURE_AD_APPLICATION_CLIENT_ID }} `
292+
--clientSecret ${{ secrets.AZURE_AD_APPLICATION_SECRET }}
293+
294+
- name: Get base metadata for a specific module
295+
shell: pwsh
296+
run: |
297+
msstore submission get <Partner center Id> -m <module name>
298+
```
299+
300+
* Run this workflow from the Actions tab in your GitHub repository. Select the relevant workflow and click Run workflow.
301+
302+
:::image type="content" source="../images/github-actions-get-base-metadata-workflow-exe.png" lightbox="../images/github-actions-get-base-metadata-workflow-exe.png" alt-text="A screenshot showing
303+
workflow run process for obtaining base metadata for EXE app.":::
304+
305+
* Upon completion, the workflow will obtain the metadata for the specified module for your app in the build logs.
306+
* Copy this and create a metadata.json file in the metadata folder.
307+
308+
*Now, under .github/workflows/, create AppMetadataAutoUpdate.yml using the provided workflow snippet:
309+
310+
```console
311+
name: AppMetadataAutoUpdate
312+
313+
on:
314+
push:
315+
paths:
316+
- 'metadata/metadata.json'
317+
318+
jobs:
319+
build:
320+
runs-on: windows-latest
321+
322+
steps:
323+
- name: Checkout repository
324+
uses: actions/checkout@v4
325+
326+
- name: Configure Microsoft Store CLI
327+
uses: microsoft/[email protected]
328+
329+
- name: Reconfigure store credentials
330+
run: msstore reconfigure `
331+
--tenantId ${{ secrets.AZURE_AD_TENANT_ID }} `
332+
--sellerId ${{ secrets.SELLER_ID }} `
333+
--clientId ${{ secrets.AZURE_AD_APPLICATION_CLIENT_ID }} `
334+
--clientSecret ${{ secrets.AZURE_AD_APPLICATION_SECRET }}
335+
336+
- name: Update metadata
337+
run: |
338+
$metadata = Get-Content -Raw "${{ github.workspace }}/metadata/metadata.json"
339+
msstore submission updateMetadata <Partner center Id> $metadata
340+
- name: Publish updated metadata
341+
run: |
342+
msstore submission publish <Partner center Id>
343+
```
344+
345+
* When metadata.json gets updated as part of the CI/CD flow in the metadata folder, it will automatically trigger the AppMetadataAutoUpdate.yml workflow.
181346

347+
The above workflows will do the following in the background:
348+
* Invoke the GitHub Action (microsoft-store-apppublisher)
349+
* Authenticate your Microsoft Store Partner Center account using the secrets you configured (Tenant ID, Client ID, Client Secret, Seller ID).
350+
* Use the Microsoft Store Developer CLI (msstore) to obtain base package info and metadata and publish the updated package or metadata to the Microsoft Store.
351+
352+
For more information on commands, refer [Microsoft Store Developer CLI (MSI/EXE)](https://learn.microsoft.com/en-us/windows/apps/publish/msstore-dev-cli/overview-exe).
353+
354+
### Step 3
355+
356+
After your GitHub Actions workflow completes successfully, check the Microsoft Store to confirm that your changes are live. Updates will appear after the certification process in Partner Center is complete.
357+
358+
---
182359

360+
We trust that this document will help significantly enhance the efficiency and reliability of your Microsoft Store update process. By following these best practices, you can streamline app publishing and ensure a consistent, high-quality release experience.

0 commit comments

Comments
 (0)