Skip to content

Commit 7f8c88c

Browse files
committed
Add publish package workflow
1 parent 341544c commit 7f8c88c

File tree

4 files changed

+38
-6
lines changed

4 files changed

+38
-6
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ci
1+
name: CI
22

33
on:
44
push:
@@ -27,4 +27,4 @@ jobs:
2727
GITHUB_TOKEN: ${{github.token}}
2828
run: |
2929
yarn install --ignore-scripts
30-
yarn build
30+
yarn build

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- '*'
9+
pull_request:
10+
branches:
11+
- main
12+
workflow_dispatch:
13+
14+
jobs:
15+
publish-github:
16+
name: Publish Package
17+
runs-on: ubuntu-latest
18+
if: startsWith(github.ref, 'refs/tags/')
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: '20.x'
24+
registry-url: 'https://registry.npmjs.org'
25+
- name: Install
26+
run: yarn install --ignore-scripts
27+
- name: Publish
28+
run: yarn publish
29+
env:
30+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.DS_Store
22
node_modules
3-
lib
3+
lib
4+
.npmrc
5+
.yarnrc

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"main": "./lib/index.js",
1010
"types": "./lib/index.d.ts",
1111
"files": [
12-
"lib"
12+
"lib",
13+
"src",
14+
"style"
1315
],
1416
"scripts": {
1517
"build": "tsc && yarn lint",
@@ -39,8 +41,6 @@
3941
"@types/throttle-debounce": "5.0.2",
4042
"@types/vscode": "^1.63.2",
4143
"@types/vscode-webview": "^1.57.0",
42-
"@typescript-eslint/eslint-plugin": "^5.49.0",
43-
"@typescript-eslint/parser": "^5.49.0",
4444
"eslint": "^9.21.0",
4545
"eslint-plugin-header": "^3.1.1",
4646
"globals": "^16.0.0",

0 commit comments

Comments
 (0)