Only publish listed on AMO when tagging or manually dispatching

Not sure if this works, only the future will tell.
pull/55/head
neobooru 2023-08-21 14:30:56 +02:00
parent 448413c9f7
commit a9acd53f89
1 changed files with 9 additions and 1 deletions

View File

@ -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