diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..8bfa4d3 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,31 @@ +on: + push: + branches: + - main + release: + types: + - created + +jobs: + build: + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 16.x + - run: npm install + - run: xvfb-run -a npm test + if: runner.os == 'Linux' + - run: npm test + if: runner.os != 'Linux' + - name: Publish + if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest' + run: npm run deploy + env: + VSCE_PAT: ${{ secrets.VSCE_PAT }}