Skip to content

Commit

Permalink
ci: update
Browse files Browse the repository at this point in the history
  • Loading branch information
beicause committed Nov 25, 2024
1 parent 149aba0 commit d4f2e24
Show file tree
Hide file tree
Showing 5 changed files with 700 additions and 1,921 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,29 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

- name: Run npm install
run: npm install
- name: Run pnpm install
run: pnpm install

- name: Run pretest
run: xvfb-run -a npm run pretest
run: xvfb-run -a pnpm run pretest
if: runner.os == 'Linux'

- name: Run pretest
run: npm run pretest
run: pnpm run pretest
if: runner.os != 'Linux'

- name: Run vsce package
run: mkdir -p out/vsix && npm exec vsce package -- -o out/vsix/
run: mkdir -p out/vsix/ && pnpm package -o out/vsix/

- name: Upload artifact
if: runner.os == 'Linux'
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,31 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

- name: Run npm install
run: npm install
- name: Run pnpm install
run: pnpm install

- name: Run vsce package
run: mkdir -p out/vsix && npm exec vsce package -- -o out/vsix/
run: mkdir -p out/vsix/ && pnpm package -o out/vsix/

- name: Create Github Release
uses: softprops/action-gh-release@v2
with:
files: out/vsix/*.vsix

- name: Publish to VS Code Marketplace
run: npm run deploy
run: pnpm run deploy
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}

- name: Publish to Open VSX
run: npm run deploy_ovsx -- --pat ${{ secrets.OVSX_PAT }}
run: pnpm run deploy_ovsx -- --pat ${{ secrets.OVSX_PAT }}
5 changes: 4 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.github/**
.vscode/**
.vscode-test/**
src/**
Expand All @@ -10,4 +11,6 @@ vsc-extension-quickstart.md
**/*.map
**/*.ts
.history
static/*.dot
static/*.dot
pnpm-lock.yaml
eslint.config.mjs
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"engines": {
"vscode": "^1.65.0"
},
"packageManager": "pnpm@9.13.2",
"categories": [
"Visualization"
],
Expand Down Expand Up @@ -61,6 +62,7 @@
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "pnpm run compile && pnpm run lint",
"package": "vsce package --no-dependencies",
"lint": "eslint src",
"format": "prettier --write .",
"test": "echo \"Test is't yet implemented\" && exit 0",
Expand All @@ -72,7 +74,7 @@
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.10",
"@types/node": "~22.9.3",
"@types/vscode": "^1.95.0",
"@types/vscode": "1.65.0",
"@vscode/test-electron": "^2.4.1",
"@vscode/vsce": "^3.2.1",
"eslint": "^9.15.0",
Expand Down
Loading

0 comments on commit d4f2e24

Please sign in to comment.