From a9acd53f89db5cf297b088f7a1f800e9b04b31dc Mon Sep 17 00:00:00 2001 From: neobooru <50623835+neobooru@users.noreply.github.com> Date: Mon, 21 Aug 2023 14:30:56 +0200 Subject: [PATCH] Only publish listed on AMO when tagging or manually dispatching Not sure if this works, only the future will tell. --- .github/workflows/build.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9616e6f..223e86d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -5,6 +5,11 @@ on: - src/** - extension/** workflow_dispatch: + inputs: + publish_amo_listed: + description: "Publish to AMO" + required: false + type: boolean jobs: build_chrome: name: "Build Chrome Extension" @@ -63,7 +68,10 @@ jobs: runs-on: ubuntu-20.04 # Doesn't really need the Chrome build, but we can reuse its cache. needs: build_chrome - if: github.ref == 'refs/heads/master' + # Only run on master branch AND if tagging or manually dispatching. + if: | + github.ref == 'refs/heads/master' && + (startsWith(github.ref, 'refs/tags/v') || github.event.inputs.publish_amo_listed == true) steps: - name: Checkout uses: actions/checkout@v2