Split workflow into build and check

This commit is contained in:
squidfunk 2023-09-22 19:40:43 +02:00
parent 97e2e8497a
commit 8fa269b635
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF

View File

@ -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: