From ce9cba1af2375c4469625de7c533d4c260d9c16c Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Tue, 24 May 2022 08:59:16 -0700 Subject: [PATCH] Added automatic Microsoft Store integration (#18456) --- .github/workflows/msstore-submissions.yml | 52 +++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/msstore-submissions.yml diff --git a/.github/workflows/msstore-submissions.yml b/.github/workflows/msstore-submissions.yml new file mode 100644 index 0000000000..c33d2b4dd2 --- /dev/null +++ b/.github/workflows/msstore-submissions.yml @@ -0,0 +1,52 @@ +name: Submit Microsoft.PowerToys package to Windows Store + +on: + workflow_dispatch: + release: + types: [published] + +jobs: + + microsoft_store: + name: Publish Microsoft Store + runs-on: ubuntu-latest + steps: + - name: Get latest URL from public releases + id: releaseVars + run: | + release=$(curl https://api.github.com/repos/Microsoft/PowerToys/releases | jq '[.[]|select(.name | contains("Release"))][0]') + assets=$(jq -n "$release" | jq '.assets') + powerToysSetup=$(jq -n "$assets" | jq '[.[]|select(.name | contains("PowerToysSetup"))]') + echo ::set-output name=powerToysInstallerX64Url::$(jq -n "$powerToysSetup" | jq -r '[.[]|select(.name | contains("x64"))][0].browser_download_url') + + - name: Configure Store Credentials + uses: microsoft/store-submission@v1 + with: + command: configure + type: win32 + seller-id: ${{ secrets.SELLER_ID }} + product-id: ${{ secrets.PRODUCT_ID }} + tenant-id: ${{ secrets.TENANT_ID }} + client-id: ${{ secrets.CLIENT_ID }} + client-secret: ${{ secrets.CLIENT_SECRET }} + + - name: Update draft submission + uses: microsoft/store-submission@v1 + with: + command: update + product-update: '{ + "packages":[ + { + "packageUrl":"${{ steps.releaseVars.outputs.powerToysInstallerX64Url }}", + "languages":["zh-hans", "zh-hant", "en", "cs", "nl", "fr", "pt", "pt-br", "de", "hu", "it", "ja", "ko", "pl", "ru", "es", "tr"], + "architectures":["X64"], + "installerParameters":"-passive", + "isSilentInstall":true + } + ] + }' + + - name: Publish Submission + uses: microsoft/store-submission@v1 + with: + command: publish \ No newline at end of file