name: Build
on:
  push:
  pull_request:
    types: [opened, synchronize]
jobs:
  test:
    name: Build the extension
    runs-on: ubuntu-latest
    steps:
    - name: Checkout the repository
      uses: actions/checkout@v2

    - 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@v1
      with:
        node-version: '${{ steps.get-node-version.outputs.NODE_VERSION }}'

    - name: Install dependencies
      run: npm install

    - name: Build the extension for Chrome
      run: |
        npx grunt clean:build
        npx grunt build:chrome
        cp -r build web-scrobbler-chrome

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

    - name: Build the extension for Firefox
      run: |
        npx grunt clean:build
        npx grunt build:firefox
        cp -r build web-scrobbler-firefox

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

name: Build
on:
  push:
  pull_request:
    types: [opened, synchronize]
jobs:
  test:
    name: Build the extension
    runs-on: ubuntu-latest
    steps:
    - name: Checkout the repository
      uses: actions/checkout@v2

    - 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@v1
      with:
        node-version: '${{ steps.get-node-version.outputs.NODE_VERSION }}'

    - name: Install dependencies
      run: npm install

    - name: Build the extension for Chrome
      run: |
        npx grunt clean:build
        npx grunt build:chrome
        cp -r build web-scrobbler-chrome

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

    - name: Build the extension for Firefox
      run: |
        npx grunt clean:build
        npx grunt build:firefox
        cp -r build web-scrobbler-firefox

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

Fix typo in workflow step name
Fix typo in workflow step name
