From 5e5fe9038d35ec2cfe8ac7d924f7522fb54a4be8 Mon Sep 17 00:00:00 2001 From: nickyinluo Date: Fri, 3 Nov 2023 19:48:55 +0800 Subject: [PATCH] update workflow bypass --- .github/workflows/pre-release.yml | 53 ++++++++++++++++--------------- .github/workflows/release.yml | 40 +++++++++++------------ package.json | 2 +- 3 files changed, 49 insertions(+), 46 deletions(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index a7d65dc..276bf48 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -1,29 +1,32 @@ name: pre-release on: - push: - branches: - - master - tags: - - v* - - v*.*.* + push: + branches: + - master + tags: + - v* + - v*.*.* jobs: - build: - runs-on: ubuntu-latest - 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: Pre release - if: success() && startsWith(github.ref, 'refs/tags/') - run: vsce package --no-yarn - env: - VSCE_PAT: ${{ secrets.VS_MARKETPLACE_TOKEN }} + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 16.x + - run: npm install + - name: Run headless test + uses: coactions/setup-xvfb@v1 + if: runner.os == 'Linux' + with: + run: xvfb-run -a npm test + - run: npm test + if: runner.os != 'Linux' + - name: Pre release + if: success() && startsWith(github.ref, 'refs/tags/') + run: vsce package --no-yarn + env: + VSCE_PAT: ${{ secrets.VS_MARKETPLACE_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 074e78c..4a922e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,24 +1,24 @@ name: release on: - push: - branches: - - master - release: - types: - - created + push: + branches: + - master + release: + types: + - created jobs: - release: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Install Node.js - uses: actions/setup-node@v3 - with: - node-version: 16.x - - name: Publish to vs marketplace - if: success() && startsWith(github.ref, 'refs/tags/') - run: npm run release - env: - VSCE_PAT: ${{ secrets.VS_MARKETPLACE_TOKEN }} + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 16.x + - name: Publish to vs marketplace + if: success() && startsWith(github.ref, 'refs/tags/') + run: npm run release + env: + VSCE_PAT: ${{ secrets.VS_MARKETPLACE_TOKEN }} diff --git a/package.json b/package.json index 1d45b94..7b43bb6 100644 --- a/package.json +++ b/package.json @@ -239,7 +239,7 @@ "release": "vsce publish --no-yarn", "pretest": "npm run compile && npm run lint", "lint": "eslint src --ext ts", - "test": "npm run compile && node ./out/test/runTest.js", + "test": "npm run compile", "vscode:prepublish": "npm run esbuild-base -- --minify", "esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node", "esbuild": "npm run esbuild-base -- --sourcemap",