Skip to content

Commit ef71015

Browse files
Add GitHub Action to index lsif-typescript's code. (#99)
1 parent 76bb514 commit ef71015

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

.github/workflows/lsif-typescript.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: upload-index
2+
on:
3+
push:
4+
paths:
5+
- '**.ts'
6+
7+
jobs:
8+
upload-index:
9+
if: github.repository == 'sourcegraph/lsif-typescript'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Install npm dependencies
14+
run: yarn --ignore-engines --ignore-scripts
15+
- name: Install src-cli
16+
run: |
17+
curl -L https://sourcegraph.com/.api/src-cli/src_linux_amd64 -o /usr/local/bin/src
18+
chmod +x /usr/local/bin/src
19+
- name: Run lsif-typescript
20+
run: ./node_modules/.bin/ts-node src/main.ts index --no-progress-bar
21+
- name: Upload index
22+
run: src lsif upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress
23+
env:
24+
SRC_ENDPOINT: https://sourcegraph.com/

Development.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ Generate snapshots and update.
2323
## Snapshotting arbitrary projects
2424

2525
```sh
26-
npm run build # build lsif-typescript
2726
cd /path/to/dir
28-
node /path/to/lsif-typescript/dist/src/main.js index # add --yarn-workspaces if applicable
27+
DIR=/path/to/lsif-typescript "$DIR/node_modules/.bin/ts-node" "$DIR/src/main.ts" index # add --yarn-workspaces if applicable
2928
lsif-typed dump.lsif-typed > dump.lsif # from github.com/sourcegraph/sourcegraph/lib/codeintel/tools/lsif-typed
3029
lsif-java snapshot-lsif # from github.com/sourcegraph/lsif-java
3130
```

0 commit comments

Comments
 (0)