Only run github actions when extension source changed

pull/55/head
neobooru 2023-08-02 19:57:25 +02:00
parent 6b93a9ced8
commit 742a6da3c0
1 changed files with 27 additions and 22 deletions

View File

@ -1,5 +1,9 @@
name: Build release name: Build release
on: [push] on:
push:
paths:
- src/**
- extension/**
jobs: jobs:
build_chrome: build_chrome:
name: "Build Chrome Extension" name: "Build Chrome Extension"
@ -53,27 +57,28 @@ jobs:
name: Firefox Extension (Signed) name: Firefox Extension (Signed)
path: web-ext-artifacts/*.xpi path: web-ext-artifacts/*.xpi
build_amo_firefox: # build_amo_firefox:
name: "Build Firefox Extension for AMO" # name: "Build Firefox Extension for AMO"
runs-on: ubuntu-20.04 # runs-on: ubuntu-20.04
# Doesn't really need the Chrome build, but we can reuse its cache. # # Doesn't really need the Chrome build, but we can reuse its cache.
needs: build_chrome # needs: build_chrome
if: github.ref == 'refs/heads/master' # if: github.ref == 'refs/heads/master'
steps: # steps:
- name: Checkout # - name: Checkout
uses: actions/checkout@v2 # uses: actions/checkout@v2
with: # with:
fetch-depth: 0 # fetch-depth: 0
- uses: ./.github/actions/setup-for-build # - uses: ./.github/actions/setup-for-build
- name: Build # - name: Build
run: pnpm build # run: pnpm build
env: # env:
SZ_GECKO_ID: 18365332-8485-4c04-9498-2843a41ab620 # SZ_GECKO_ID: 18365332-8485-4c04-9498-2843a41ab620
- name: Sign XPI and upload to AMO # TODO: Add --channel=listed
run: pnpm sign:firefox # - name: Sign XPI and upload to AMO
env: # run: pnpm sign:firefox
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }} # env:
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }} # WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
# WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}