32 lines
745 B
YAML
32 lines
745 B
YAML
name: "Check build"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
- reopened
|
|
|
|
jobs:
|
|
check-dist:
|
|
runs-on: stackit-docker
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: "20"
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
- name: Rebuild Action
|
|
run: npm run build
|
|
- name: Check for uncommitted changes
|
|
run: |
|
|
if [[ -n "$(git status --porcelain dist/)" ]]; then
|
|
echo "::error::Distribution file is not up to date. Please run 'npm run build' and commit dist/index.js."
|
|
exit 1
|
|
fi
|