From f3547c8d2aa7222696eadf9ce91322bcc9c2343e Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Fri, 27 May 2022 21:14:41 +0200 Subject: [PATCH] chore: publish to the Windows Store every week --- .github/workflows/inno.yml | 12 ++++++++++++ .../workflows/{store.yml => microsoft_store.yml} | 13 +++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) rename .github/workflows/{store.yml => microsoft_store.yml} (81%) diff --git a/.github/workflows/inno.yml b/.github/workflows/inno.yml index cc49bb64..2ff3de25 100644 --- a/.github/workflows/inno.yml +++ b/.github/workflows/inno.yml @@ -64,4 +64,16 @@ jobs: ref: 'main', inputs: {"version": process.env.GITHUB_REF.replace('refs/tags/v', '')} }) + - name: Notify App Store Build 👋 + uses: actions/github-script@v5 + with: + github-token: ${{ secrets.GH_PAT }} + script: | + await github.request('POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches', { + owner: 'jandedobbeleer', + repo: '${{ github.event.repository.name }}', + workflow_id: 'microsoft_store.yml', + ref: 'main', + inputs: {"version": process.env.GITHUB_REF.replace('refs/tags/v', '')} + }) diff --git a/.github/workflows/store.yml b/.github/workflows/microsoft_store.yml similarity index 81% rename from .github/workflows/store.yml rename to .github/workflows/microsoft_store.yml index 1a72d377..b7648af5 100644 --- a/.github/workflows/store.yml +++ b/.github/workflows/microsoft_store.yml @@ -1,20 +1,18 @@ name: Submit Oh My Posh to the Windows Store - on: workflow_dispatch: inputs: version: - description: 'The version to publish' + description: 'The latest version' required: true jobs: - microsoft_store: name: Publish Microsoft Store runs-on: ubuntu-latest steps: - name: Configure Store Credentials 🔑 - uses: microsoft/store-submission@v1 + uses: jandedobbeleer/store-submission@submission-status with: command: configure type: win32 @@ -23,9 +21,9 @@ jobs: tenant-id: ${{ secrets.TENANT_ID }} client-id: ${{ secrets.CLIENT_ID }} client-secret: ${{ secrets.CLIENT_SECRET }} - + only-on-ready: true - name: Update draft submission - uses: microsoft/store-submission@v1 + uses: jandedobbeleer/store-submission@submission-status with: command: update product-update: '{ @@ -39,8 +37,7 @@ jobs: } ] }' - - name: Publish Submission - uses: microsoft/store-submission@v1 + uses: jandedobbeleer/store-submission@submission-status with: command: publish