Skip to content

Commit aac58c8

Browse files
committed
fix(publish): Adjust yarn workspace cmd
1 parent 5657eb6 commit aac58c8

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

.github/workflows/publish.yaml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Publish
2-
on:
2+
on:
33
push:
44
tags:
55
# This is triggered when new tag starting with v is pushed to the repository.
@@ -9,40 +9,40 @@ jobs:
99
publish-sql-parser:
1010
name: Publish SQL Parser
1111
runs-on: ubuntu-latest
12-
steps:
12+
steps:
1313
- uses: actions/checkout@v3
1414

1515
- name: Read the tag name
1616
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
1717

1818
- uses: actions/setup-node@v3
1919
with:
20-
node-version: 16.x
21-
cache: 'yarn'
20+
node-version: 16.x
21+
cache: 'yarn'
2222

2323
- name: Set package version from git tag
24-
run: |
24+
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 @deepnote/sql-parser version --new-version ${VERSION} --no-git-tag-version
2828
2929
- run: yarn install
3030
- run: yarn npm:prepublish
3131

32-
# We rename the package dynamically to include the @deepnote namespace
32+
# We rename the package dynamically to include the @deepnote namespace
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
3636
run: npm pkg set name=@deepnote/sql-parser --workspace packages/sql-parser
3737

3838
- name: Configure github packages npm repository
39-
run: |
40-
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
41-
echo "@deepnote:registry=https://npm.pkg.github.com" >> ~/.npmrc
42-
# We use `npm publish` instead of `yarn publish` because yarn publish
39+
run: |
40+
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
41+
echo "@deepnote:registry=https://npm.pkg.github.com" >> ~/.npmrc
42+
# We use `npm publish` instead of `yarn publish` because yarn publish
4343
4444
# We use `npm publish` instead of `yarn publish` because yarn publish
45-
# checks if the repository is clean and fails if it's not. This is complicated for us, given we rename
45+
# checks if the repository is clean and fails if it's not. This is complicated for us, given we rename
4646
# the package dynamically and we don't want to commit the changes to the package.json.
4747
- name: Publish the sql-parser package
4848
run: npm publish --workspace packages/sql-parser
@@ -51,39 +51,39 @@ jobs:
5151
name: Publish Server
5252
runs-on: ubuntu-latest
5353
needs: publish-sql-parser
54-
steps:
54+
steps:
5555
- uses: actions/checkout@v3
5656

5757
- name: Read the tag name
5858
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
5959

6060
- uses: actions/setup-node@v3
6161
with:
62-
node-version: 16.x
63-
cache: 'yarn'
62+
node-version: 16.x
63+
cache: 'yarn'
6464

6565
- name: Set package version from git tag
66-
run: |
66+
run: |
6767
GIT_TAG=${{ github.ref_name }}
6868
VERSION="${GIT_TAG#v}"
6969
yarn workspace sql-language-server version --new-version ${VERSION} --no-git-tag-version
7070
7171
- run: yarn install
7272
- run: yarn npm:prepublish
7373

74-
# We rename the package dynamically to include the @deepnote namespace
74+
# We rename the package dynamically to include the @deepnote namespace
7575
# in the build script instead of renaming it in the package.json
7676
# because other packages depend on it and we want to keep the name the same for tests to pass.
7777
- name: Rename the package
7878
run: npm pkg set name=@deepnote/sql-language-server --workspace packages/server
79-
79+
8080
- name: Configure github packages npm repository
81-
run: |
82-
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
83-
echo "@deepnote:registry=https://npm.pkg.github.com" >> ~/.npmrc
81+
run: |
82+
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
83+
echo "@deepnote:registry=https://npm.pkg.github.com" >> ~/.npmrc
8484
8585
# We use `npm publish` instead of `yarn publish` because yarn publish
86-
# checks if the repository is clean and fails if it's not. This is complicated for us, given we rename
86+
# checks if the repository is clean and fails if it's not. This is complicated for us, given we rename
8787
# the package dynamically and we don't want to commit the changes to the package.json.
8888
- name: Publish the server package
89-
run: npm publish --workspace packages/server
89+
run: npm publish --workspace packages/server

0 commit comments

Comments
 (0)