Skip to content

Commit

Permalink
Try to fix the environment variables... 4th
Browse files Browse the repository at this point in the history
  • Loading branch information
brichet committed Apr 8, 2024
1 parent 9d119c2 commit 776f85c
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 776f85c

Please sign in to comment.