From 63a26ad3e67e2b16059fccd93cac7f2afedbbf12 Mon Sep 17 00:00:00 2001 From: jloh02 <36648707+jloh02@users.noreply.github.com> Date: Sat, 12 Nov 2022 10:32:37 +0800 Subject: [PATCH] Create publish.yml --- .github/workflows/publish.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/publish.yml 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 }}