From 590f877756a09837e40f2389b18b7e2baab0e500 Mon Sep 17 00:00:00 2001 From: Andreas Troelsen Date: Sun, 31 Dec 2023 02:25:41 +0100 Subject: [PATCH] Build on push to branches, not tags. According to the documentation, by not specifying anything in the `push` event, GitHub Actions will run the workflow for both branches and tags, but by specifying `branches` alone, it will _only_ run the workflow for branches and _not_ tags [1]. We want to build on pushes to _all_ branches so we can give folks a jar to try out for feature requests and bug fixes. We don't want to build on tags, however, because they don't provide any value in the current build pipeline. If the version was derived from Git tags, it could make sense to build on tags, but that's not where we are. As for the `**` glob pattern instead of just `*`, the documentation says that the latter does not match forward slashes [2], and while our naming convention for branches doesn't use slashes right now, there's no reason that they shouldn't be viable later down the road. --- [1] https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore [2] https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c29ae6..cff3bdb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,8 @@ name: build on: workflow_dispatch: push: + branches: + - '**' jobs: build: