Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split build workflow into multiple jobs #3660

Merged
merged 1 commit into from
Apr 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
56 changes: 47 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
pull_request:
types: [opened, synchronize]
jobs:
build:
name: Build the extension
runs-on: macos-latest
build-chrome:
name: Build the extension for Chrome
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
Expand All @@ -23,31 +23,69 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Build the extension for Chrome
- name: Build the extension
run: |
npm run build chrome

- name: Upload the extension for Chrome as an artifact
- name: Upload the extension as an artifact
uses: actions/upload-artifact@v3
with:
name: web-scrobbler-chrome
path: build/chrome

build-firefox:
name: Build the extension for Firefox
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3

- name: Build the extension for Firefox
- name: Get Node.js version from .nvmrc
id: get-node-version
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '${{ steps.get-node-version.outputs.NODE_VERSION }}'

- name: Install dependencies
run: npm ci

- name: Build the extension
run: |
npm run build firefox

- name: Upload the extension for Firefox as an artifact
- name: Upload the extension as an artifact
uses: actions/upload-artifact@v3
with:
name: web-scrobbler-firefox
path: build/firefox

- name: Build the extension for Safari
build-safari:
name: Build the extension for Safari
runs-on: macos-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3

- name: Get Node.js version from .nvmrc
id: get-node-version
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '${{ steps.get-node-version.outputs.NODE_VERSION }}'

- name: Install dependencies
run: npm ci

- name: Build the extension
run: |
npm run build safari

- name: Upload the extension for Safari as an artifact
- name: Upload the extension as an artifact
uses: actions/upload-artifact@v3
with:
name: web-scrobbler-safari
Expand Down