Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 32 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -181,16 +178,42 @@ jobs:
private-key: ${{ secrets.TECHPRIMATE_RELEASE_BOT_PRIVATE_KEY }}
repositories: publisher
owner: techprimate
permission-actions: write
Comment thread
philprime marked this conversation as resolved.
Resolved

- name: Dispatch publish workflow
id: dispatch
uses: actions/github-script@v9
env:
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: |
gh workflow run publish.yml \
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
Expand Down
Loading