Skip to content

Commit 690c386

Browse files
committed
WIP: Github action
1 parent d545519 commit 690c386

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/publish.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish
2+
on: [push]
3+
4+
jobs:
5+
publish:
6+
name: Publish
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- uses: actions/setup-node@v3
11+
with:
12+
node-version: 16.x
13+
- run: yarn install
14+
- run: yarn npm:prepublish
15+
- name: Set the package name
16+
# This is needed because we don't want to change `package.json` -- not to drift from the upstream
17+
# repo too much.
18+
# At the same time, we need to publish the package under a different name, so that we can distinguish
19+
# it from the original package.
20+
run: npm pkg set --workspace packages/server name=@deepnote/sql-language-server
21+
- name: Configure github packages npm repository
22+
run: |
23+
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
24+
echo "@deepnote:registry=https://npm.pkg.github.com" >> ~/.npmrc
25+
- name: Set package version
26+
run: npm version 1.3.0-pre-${{ github.sha }}
27+
- name: Publish the server package
28+
run: |
29+
npm publish --workspace packages/server
30+
31+

0 commit comments

Comments
 (0)