Skip to content

Commit eca494a

Browse files
ci(build): change browser env to platform
1 parent 13b174e commit eca494a

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: 'Build extension and plugin'
22
on:
33
workflow_call:
44
inputs:
5-
browser:
5+
platform:
66
required: false
77
type: string
8-
description: 'The browser to build the extension for'
8+
description: 'The platform to build the extension for; chrome, firefox, emacs, or all. Default is all.'
99
default: 'all'
1010

1111
env:
@@ -36,61 +36,61 @@ jobs:
3636
run: pnpm install --frozen-lockfile
3737

3838
- name: Build the extension for chrome
39-
if: ${{ inputs.browser == 'all' || inputs.browser == 'chrome' }}
39+
if: ${{ inputs.platform == 'all' || inputs.platform == 'chrome' }}
4040
run: pnpm run build
4141

4242
- name: Package the extension for chrome
43-
if: ${{ inputs.browser == 'all' || inputs.browser == 'chrome' }}
43+
if: ${{ inputs.platform == 'all' || inputs.platform == 'chrome' }}
4444
run: pnpm run package
4545

4646
- name: Add Chrome extension to artifacts
47-
if: ${{ inputs.browser == 'all' || inputs.browser == 'chrome' }}
47+
if: ${{ inputs.platform == 'all' || inputs.platform == 'chrome' }}
4848
uses: actions/upload-artifact@v4
4949
with:
5050
name: chrome-mv3-prod.zip
5151
path: build/chrome-mv3-prod.zip
5252
retention-days: ${{ env.retentionDays }}
5353

5454
- name: Build the extension for firefox
55-
if: ${{ inputs.browser == 'all' || inputs.browser == 'firefox' }}
55+
if: ${{ inputs.platform == 'all' || inputs.platform == 'firefox' }}
5656
run: pnpm run build --target=firefox-mv3
5757

5858
- name: Package the extension for firefox
59-
if: ${{ inputs.browser == 'all' || inputs.browser == 'firefox' }}
59+
if: ${{ inputs.platform == 'all' || inputs.platform == 'firefox' }}
6060
run: pnpm run package --target=firefox-mv3
6161

6262
- name: Add Firefox extension to artifacts
63-
if: ${{ inputs.browser == 'all' || inputs.browser == 'firefox' }}
63+
if: ${{ inputs.platform == 'all' || inputs.platform == 'firefox' }}
6464
uses: actions/upload-artifact@v4
6565
with:
6666
name: firefox-mv3-prod.zip
6767
path: build/firefox-mv3-prod.zip
6868
retention-days: ${{ env.retentionDays }}
6969

7070
- name: Set up Emacs
71-
if: ${{ inputs.browser == 'all' || inputs.browser == 'emacs' }}
71+
if: ${{ inputs.platform == 'all' || inputs.platform == 'emacs' }}
7272
uses: jcs090218/setup-emacs@master
7373
with:
7474
version: ${{ env.emacsVersion }}
7575

7676
- name: Install Eldev
77-
if: ${{ inputs.browser == 'all' || inputs.browser == 'emacs' }}
77+
if: ${{ inputs.platform == 'all' || inputs.platform == 'emacs' }}
7878
uses: emacs-eldev/setup-eldev@v1
7979

8080
- name: Build the emacs plugin
81-
if: ${{ inputs.browser == 'all' || inputs.browser == 'emacs' }}
81+
if: ${{ inputs.platform == 'all' || inputs.platform == 'emacs' }}
8282
run: |
8383
BUILD_OUTPUT_PATH=`eldev package --print-filename | sed -n 'x;$p'`
8484
echo "Build_output_path=$BUILD_OUTPUT_PATH" >> "$GITHUB_ENV"
8585
8686
- name: Get basename
87-
if: ${{ inputs.browser == 'all' || inputs.browser == 'emacs' }}
87+
if: ${{ inputs.platform == 'all' || inputs.platform == 'emacs' }}
8888
run: |
8989
BUILD_BASENAME=`basename ${{ env.Build_output_path }}`
9090
echo "Build_basename=$BUILD_BASENAME" >> "$GITHUB_ENV"
9191
9292
- name: Add Emacs plugin to artifacts
93-
if: ${{ inputs.browser == 'all' || inputs.browser == 'emacs' }}
93+
if: ${{ inputs.platform == 'all' || inputs.platform == 'emacs' }}
9494
uses: actions/upload-artifact@v4
9595
with:
9696
name: ${{ env.Build_basename }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
build-for-release:
77
uses: ./.github/workflows/build.yml
88
with:
9-
browser: all
9+
platform: all
1010

1111
create-gh-release:
1212
runs-on: ubuntu-latest

.github/workflows/submit-chrome.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
build-chrome:
77
uses: ./.github/workflows/build.yml
88
with:
9-
browser: chrome
9+
platform: chrome
1010

1111
submit-chrome:
1212
runs-on: ubuntu-latest

.github/workflows/submit-firefox.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
build-firefox:
77
uses: ./.github/workflows/build.yml
88
with:
9-
browser: firefox
9+
platform: firefox
1010

1111
submit-firefox:
1212
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)