on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  run:
    name: Upload vsix package
    strategy:
      matrix:
        os: [macos-latest, ubuntu-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Setup Node.js
        uses: actions/setup-node@v2
        with:
          node-version: 14
      - name: Install dependencies
        run: npm install
      - name: Install vsce
        run: npm install -g vsce
      - name: Run vscode:prepublish
        run: npm run vscode:prepublish
      - name: Run headless test
        uses: GabrielBB/xvfb-action@v1.0
        with:
          run: npm test
      - name: Build vsix package
        run: vsce package
      - name: Upload vsix package
        uses: actions/upload-artifact@v2
        with:
          path: veriloghdl-*.vsix

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  run:
    name: Upload vsix package
    strategy:
      matrix:
        os: [macos-latest, ubuntu-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Setup Node.js
        uses: actions/setup-node@v2
        with:
          node-version: 14
      - name: Install dependencies
        run: npm install
      - name: Install vsce
        run: npm install -g vsce
      - name: Run vscode:prepublish
        run: npm run vscode:prepublish
      - name: Run headless test
        uses: GabrielBB/xvfb-action@v1.6
        with:
          run: npm test
      - name: Build vsix package
        run: vsce package
      - name: Upload vsix package
        uses: actions/upload-artifact@v2
        with:
          path: veriloghdl-*.vsix

Update GabrielBB/xvfb-action action to v1.6
Update GabrielBB/xvfb-action action to v1.6