Skip to content

Commit 2ec6368

Browse files
committed
chore: Refactor build action
1 parent d7082a3 commit 2ec6368

File tree

7 files changed

+31
-43
lines changed

7 files changed

+31
-43
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Build
2+
on: [push]
3+
jobs:
4+
test:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- uses: actions/setup-node@v3
9+
with:
10+
node-version: 16
11+
- run: npm run format:check
12+
- run: npm run lint
13+
- run: npm run compile -- --noEmit
14+
release:
15+
needs: test
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: actions/setup-node@v3
20+
with:
21+
node-version: 16
22+
- run: npm ci
23+
- run: npx semantic-release
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
VSCE_PAT: ${{ secrets.VSCE_TOKEN }}

.github/workflows/format.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
out
22
dist
33
node_modules
4-
.vscode-test/
54
*.vsix

.vscodeignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.vscode/**
2-
.vscode-test/**
32
src/**
43
.gitignore
54
**/tsconfig.json

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# VS Code npm Outdated
22

3-
[![Build status](https://img.shields.io/github/workflow/status/mskelton/vscode-npm-outdated/Release/main.svg?logo=github)](https://github.com/mskelton/vscode-npm-outdated/actions?query=workflow%3ARelease)
3+
[![build](https://github.com/mskelton/vscode-npm-outdated/actions/workflows/build.yml/badge.svg)](https://github.com/mskelton/vscode-npm-outdated/actions/workflows/build.yml)
44
[![Semantic release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
55

66
Displays a diagnostic message in package.json files for packages which have newer versions available as well as a code action to quickly update packages to their latest version.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727
},
2828
"scripts": {
2929
"vscode:prepublish": "npm run compile",
30-
"compile": "tsc -p ./",
31-
"watch": "tsc -watch -p ./",
32-
"pretest": "npm run compile && npm run lint",
30+
"compile": "tsc",
31+
"watch": "tsc -watch",
3332
"lint": "eslint src --ext ts",
34-
"test": "node ./out/test/runTest.js"
33+
"format:check": "prettier --check .",
34+
"format": "prettier --write ."
3535
},
3636
"icon": "assets/icon.png",
3737
"engines": {

0 commit comments

Comments
 (0)