Skip to content

Commit 5b07408

Browse files
committed
Fix publish workflow, add package_dir and use it for exoframe-cli
1 parent c4f36e3 commit 5b07408

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ jobs:
4040
- name: exoframe-client
4141
workspace: exoframe-client
4242
- name: exoframe
43-
workspace: exoframe-cli
44-
build: npm run build -w exoframe-cli
43+
workspace: exoframe
44+
package_dir: exoframe-cli
45+
build: npm run build -w exoframe
4546
- name: exoframe-server
4647
workspace: exoframe-server
4748
server: true
@@ -64,9 +65,10 @@ jobs:
6465
run: |
6566
TAG="${{ needs.detect-tag.outputs.npm_tag }}"
6667
PACKAGE="${{ matrix.name }}"
68+
PACKAGE_DIR="${{ matrix.package_dir || matrix.workspace }}"
6769
current=$(npm info "${PACKAGE}@${TAG}" version 2>/dev/null || true)
6870
echo "current=${current:-none}" >> "$GITHUB_OUTPUT"
69-
echo "new=$(npm info ./packages/${{ matrix.workspace }} version)" >> "$GITHUB_OUTPUT"
71+
echo "new=$(npm info ./packages/${PACKAGE_DIR} version)" >> "$GITHUB_OUTPUT"
7072
7173
- name: install
7274
if: ${{ steps.versions.outputs.current != steps.versions.outputs.new }}
@@ -98,11 +100,13 @@ jobs:
98100
- name: get version
99101
if: ${{ matrix.server && steps.versions.outputs.current != steps.versions.outputs.new }}
100102
id: version
101-
run: echo "new=$(npm info ./packages/${{ matrix.workspace }} version)" >> "$GITHUB_OUTPUT"
103+
env:
104+
PACKAGE_DIR: ${{ matrix.package_dir || matrix.workspace }}
105+
run: echo "new=$(npm info ./packages/${PACKAGE_DIR} version)" >> "$GITHUB_OUTPUT"
102106

103107
- name: Build & push docker image
104108
if: ${{ matrix.server && steps.versions.outputs.current != steps.versions.outputs.new }}
105-
working-directory: ./packages/${{ matrix.workspace }}
109+
working-directory: ./packages/${{ matrix.package_dir || matrix.workspace }}
106110
env:
107111
IMAGE_NAME: exoframe/server
108112
GHCR_IMAGE_NAME: exoframejs/server

0 commit comments

Comments
 (0)