From 8fa269b635848a651518f703bccfad82c14d4171 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 22 Sep 2023 19:40:43 +0200 Subject: [PATCH] Split workflow into build and check --- .github/workflows/build.yml | 39 +++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23b0bb1cb..7fd2c0de2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,37 @@ permissions: contents: read jobs: - npm: + npm-build: + name: Build sources + runs-on: ubuntu-latest + steps: + + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js runtime + uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} + + - name: Set up Node.js dependency cache + uses: actions/cache@v3 + id: cache + with: + key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} + path: node_modules + + - name: Set up Node.js dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: npm install + + - name: Build project + run: | + npm run build + git diff --name-only + + npm-check: + name: Check sources runs-on: ubuntu-latest steps: @@ -62,12 +92,8 @@ jobs: - name: Check project run: npm run check - - name: Build project - run: | - npm run build - git diff --name-only - pypi: + name: Publish Python package runs-on: ubuntu-latest steps: @@ -94,6 +120,7 @@ jobs: run: twine upload --disable-progress-bar -u ${PYPI_USERNAME} -p ${PYPI_PASSWORD} dist/* docker: + name: Publish Docker image runs-on: ubuntu-latest steps: