Skip to content

Commit c2343c4

Browse files
Switch the two jobs around and add a dependency of server package on sql-parser
1 parent 1f18433 commit c2343c4

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

.github/workflows/publish.yaml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on:
66
- v**
77

88
jobs:
9-
publish-server:
10-
name: Publish Server
9+
publish-sql-parser:
10+
name: Publish SQL Parser
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v3
@@ -24,7 +24,7 @@ jobs:
2424
run: |
2525
GIT_TAG=${{ github.ref_name }}
2626
VERSION="${GIT_TAG#v}"
27-
yarn workspace sql-language-server version --new-version ${VERSION} --no-git-tag-version
27+
yarn workspace sql-parser version --new-version ${VERSION} --no-git-tag-version
2828
2929
- run: yarn install
3030
- run: yarn npm:prepublish
@@ -33,22 +33,24 @@ jobs:
3333
# in the build script instead of renaming it in the package.json
3434
# because other packages depend on it and we want to keep the name the same for tests to pass.
3535
- name: Rename the package
36-
run: npm pkg set name=@deepnote/sql-language-server --workspace packages/server
37-
36+
run: npm pkg set name=@deepnote/sql-parser --workspace packages/sql-parser
37+
3838
- name: Configure github packages npm repository
3939
run: |
4040
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
4141
echo "@deepnote:registry=https://npm.pkg.github.com" >> ~/.npmrc
42+
# We use `npm publish` instead of `yarn publish` because yarn publish
4243
4344
# We use `npm publish` instead of `yarn publish` because yarn publish
4445
# checks if the repository is clean and fails if it's not. This is complicated for us, given we rename
4546
# the package dynamically and we don't want to commit the changes to the package.json.
46-
- name: Publish the server package
47-
run: npm publish --workspace packages/server
47+
- name: Publish the sql-parser package
48+
run: npm publish --workspace packages/sql-parser
4849

49-
publish-sql-parser:
50-
name: Publish SQL Parser
50+
publish-server:
51+
name: Publish Server
5152
runs-on: ubuntu-latest
53+
needs: publish-sql-parser
5254
steps:
5355
- uses: actions/checkout@v3
5456

@@ -64,7 +66,7 @@ jobs:
6466
run: |
6567
GIT_TAG=${{ github.ref_name }}
6668
VERSION="${GIT_TAG#v}"
67-
yarn workspace sql-parser version --new-version ${VERSION} --no-git-tag-version
69+
yarn workspace sql-language-server version --new-version ${VERSION} --no-git-tag-version
6870
6971
- run: yarn install
7072
- run: yarn npm:prepublish
@@ -73,16 +75,15 @@ jobs:
7375
# in the build script instead of renaming it in the package.json
7476
# because other packages depend on it and we want to keep the name the same for tests to pass.
7577
- name: Rename the package
76-
run: npm pkg set name=@deepnote/sql-parser --workspace packages/sql-parser
77-
78+
run: npm pkg set name=@deepnote/sql-language-server --workspace packages/server
79+
7880
- name: Configure github packages npm repository
7981
run: |
8082
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
8183
echo "@deepnote:registry=https://npm.pkg.github.com" >> ~/.npmrc
82-
# We use `npm publish` instead of `yarn publish` because yarn publish
8384
8485
# We use `npm publish` instead of `yarn publish` because yarn publish
8586
# checks if the repository is clean and fails if it's not. This is complicated for us, given we rename
8687
# the package dynamically and we don't want to commit the changes to the package.json.
87-
- name: Publish the sql-parser package
88-
run: npm publish --workspace packages/sql-parser
88+
- name: Publish the server package
89+
run: npm publish --workspace packages/server

0 commit comments

Comments
 (0)