From e1ae110bb5a9c2e86861473a3b010e7cf66fd6f0 Mon Sep 17 00:00:00 2001 From: Philip Niedertscheider Date: Sun, 29 Nov 2026 12:41:09 +0100 Subject: [PATCH 1/2] ci(release): Wait for publisher completion --- .github/workflows/release.yml | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index edccba2..fb28da2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -164,14 +164,11 @@ jobs: prerelease: ${{ needs.prepare.outputs.is_prerelease == 'true' }} trigger-publisher: - name: Trigger Release Publisher + name: Publish Release Packages needs: [prepare, release] - # Dispatch the techprimate/publisher workflow that publishes this GitHub - # Release through packages.techprimate.com. Replaces the in-repo Homebrew tap - # automation. if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-latest - timeout-minutes: 5 + timeout-minutes: 55 steps: - name: Generate GitHub App token id: app-token @@ -181,16 +178,30 @@ jobs: private-key: ${{ secrets.TECHPRIMATE_RELEASE_BOT_PRIVATE_KEY }} repositories: publisher owner: techprimate + permission-actions: write - name: Dispatch publish workflow env: GH_TOKEN: ${{ steps.app-token.outputs.token }} + SOURCE_REPO: ${{ github.repository }} + TAG: ${{ needs.prepare.outputs.publish_tag }} run: | - gh workflow run publish.yml \ + response=$(gh api --method POST \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + repos/techprimate/publisher/actions/workflows/publish.yml/dispatches \ + -f ref=main \ + -F return_run_details=true \ + -f "inputs[source_repo]=$SOURCE_REPO" \ + -f "inputs[tag]=$TAG") + run_id=$(jq -er '.workflow_run_id' <<< "$response") + run_url=$(jq -er '.html_url' <<< "$response") + echo "Publisher run: $run_url" + printf 'Publisher run: %s\n' "$run_url" >> "$GITHUB_STEP_SUMMARY" + + gh run watch "$run_id" \ --repo techprimate/publisher \ - --ref main \ - -f source_repo="${{ github.repository }}" \ - -f tag="${{ needs.prepare.outputs.publish_tag }}" + --interval 15 \ + --exit-status release-required-check: name: Release - Required Check From 34e4e4bc406c75551fd68c59be60b760ead4cd79 Mon Sep 17 00:00:00 2001 From: Philip Niedertscheider Date: Sun, 29 Nov 2026 12:49:21 +0100 Subject: [PATCH 2/2] ci(release): Dispatch publisher with github-script --- .github/workflows/release.yml | 40 +++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fb28da2..ae4b205 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -181,24 +181,36 @@ jobs: permission-actions: write - name: Dispatch publish workflow + id: dispatch + uses: actions/github-script@v9 env: - GH_TOKEN: ${{ steps.app-token.outputs.token }} SOURCE_REPO: ${{ github.repository }} TAG: ${{ needs.prepare.outputs.publish_tag }} + with: + github-token: ${{ steps.app-token.outputs.token }} + script: | + const { data } = await github.rest.actions.createWorkflowDispatch({ + owner: 'techprimate', + repo: 'publisher', + workflow_id: 'publish.yml', + ref: 'main', + inputs: { + source_repo: process.env.SOURCE_REPO, + tag: process.env.TAG, + }, + return_run_details: true, + headers: { 'X-GitHub-Api-Version': '2022-11-28' }, + }); + core.setOutput('run-id', data.workflow_run_id); + core.info(`Publisher run: ${data.html_url}`); + await core.summary.addRaw(`Publisher run: ${data.html_url}\n`).write(); + + - name: Wait for publisher + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} + RUN_ID: ${{ steps.dispatch.outputs.run-id }} run: | - response=$(gh api --method POST \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - repos/techprimate/publisher/actions/workflows/publish.yml/dispatches \ - -f ref=main \ - -F return_run_details=true \ - -f "inputs[source_repo]=$SOURCE_REPO" \ - -f "inputs[tag]=$TAG") - run_id=$(jq -er '.workflow_run_id' <<< "$response") - run_url=$(jq -er '.html_url' <<< "$response") - echo "Publisher run: $run_url" - printf 'Publisher run: %s\n' "$run_url" >> "$GITHUB_STEP_SUMMARY" - - gh run watch "$run_id" \ + gh run watch "$RUN_ID" \ --repo techprimate/publisher \ --interval 15 \ --exit-status