Skip to content

Commit

Permalink
add vsce publish in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonly committed Jan 21, 2021
1 parent 9e73543 commit 7d71349
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 17 deletions.
58 changes: 43 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,18 @@ on:
pull_request:
branches:
- master
release:
types:
- created
jobs:
build:
debug:
runs-on: ubuntu-latest
steps:
- name: Print context
run: |
echo "github.ref: ${{ github.ref }}"
echo "github.event_name : ${{ github.event_name }}"
test:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
Expand All @@ -18,17 +28,35 @@ jobs:
node: 10
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm install
- name: Test (Linux)
if: runner.os == 'Linux'
run: xvfb-run -a npm test
- name: Test (macOS, Windows)
if: runner.os != 'Linux'
run: npm test
- name: Checkout
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm install
- name: Test on Linux
if: runner.os == 'Linux'
run: xvfb-run -a npm test
- name: Test on macOS, Windows
if: runner.os != 'Linux'
run: npm test
publish:
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 14
- name: Install dependencies
run: npm install
- name: Publish
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v')
run: npm run deploy
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# TiDE

![ci](https://github.com/dragonly/ticode/workflows/ci/badge.svg)

TiDE is a Visual Studio Code extension that makes developing TiDB a breeze.

Still in the loop of coding, compiling, copying binary to servers, restarting every process and pulling information from logs everywhere?
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"description": "make developing TiDB a breeze",
"icon": "media/logo.png",
"version": "0.2.1",
"version": "0.2.2",
"engines": {
"vscode": "^1.52.0"
},
Expand Down Expand Up @@ -359,7 +359,8 @@
"pretest": "npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js",
"fmt": "prettier --write ."
"fmt": "prettier --write .",
"deploy": "vsce publish"
},
"devDependencies": {
"@types/glob": "^7.1.3",
Expand All @@ -374,6 +375,7 @@
"mocha": "^8.1.3",
"prettier": "^2.2.1",
"typescript": "^4.1.2",
"vsce": "^1.84.0",
"vscode-test": "^1.4.1"
},
"dependencies": {
Expand Down

0 comments on commit 7d71349

Please sign in to comment.