From 776f85c888afaa769e94af25f91380975a50b4d2 Mon Sep 17 00:00:00 2001 From: Nicolas Brichet Date: Mon, 8 Apr 2024 17:01:22 +0200 Subject: [PATCH] Try to fix the environment variables... 4th --- .github/workflows/build.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b242a83..ffed4fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,12 +46,19 @@ jobs: matrix: extension: [collaborative, websocket] name: Build ${{ matrix.extension }} chat extension + env: + EXTENSION: ${{ matrix.extension }} steps: - name: Create variables run: | - [ "${{ matrix.extension }}" = "websocket" ] && echo "PACKAGE=jupyterlab_ws_chat" || echo "PACKAGE=jupyterlab_${{ matrix.extension }}_chat" >> $GITHUB_ENV - [ "${{ matrix.extension }}" = "websocket" ] && echo "DIRECTORY=packages/jupyterlab-ws-chat" || echo "DIRECTORY=packages/jupyterlab-${{ matrix.extension }}-chat" >> $GITHUB_ENV + if [ "${EXTENSION}" = "websocket" ]; then + echo "PACKAGE=jupyterlab_ws_chat" >> $GITHUB_ENV + echo "DIRECTORY=packages/jupyterlab-ws-chat" >> $GITHUB_ENV + else + echo "PACKAGE=jupyterlab_${EXTENSION}_chat" >> $GITHUB_ENV + echo "DIRECTORY=packages/jupyterlab-${EXTENSION}-chat" >> $GITHUB_ENV + fi echo $GITHUB_ENV - name: Checkout @@ -66,21 +73,21 @@ jobs: - name: Build package run: | jlpm install - jlpm build:${{ matrix.extension }} + jlpm build:${EXTENSION} - - name: Package $PACKAGE - working-directory: $DIRECTORY + - name: Package ${PACKAGE} + working-directory: ${DIRECTORY} run: | set -eux pip install build python -m build - pip uninstall -y "$PACKAGE" jupyterlab + pip uninstall -y "${PACKAGE}" jupyterlab - - name: Upload $PACKAGE package + - name: Upload ${PACKAGE} package uses: actions/upload-artifact@v3 with: name: package-artifacts - path: $DIRECTORY/dist/$PACKAGE* + path: ${DIRECTORY}/dist/${PACKAGE}* if-no-files-found: error check_links: