build on pull requests, drop per-branch push builds

A push builds in the repository it was pushed to, so a contributor's
branch builds in their fork and the base repository sees nothing. Without
a run of its own there is no check on the pull request for branch
protection to require, so trigger on pull_request as well.

Push builds narrow to master and v* tags: with pull requests covered,
building every branch push only duplicated the same commit's build across
four Windows matrix jobs. Master still builds so the "latest" pre-release
keeps updating. A branch with no pull request open builds via
workflow_dispatch.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Marco Antonio J. Costa
2026-07-27 14:39:51 -03:00
committed by majcosta
co-authored by Claude Opus 5
parent fd47a422b5
commit d68f046ea3
+2 -1
View File
@@ -3,9 +3,10 @@ name: build
on:
push:
branches:
- '**'
- master
tags:
- 'v*'
pull_request:
# allows to manually trigger a build
workflow_dispatch:
inputs: