workflows: add workflow to avoid checking in ungenerated code (#41)

This commit is contained in:
Aayush Shah 2024-11-25 14:25:13 -05:00 committed by GitHub
parent 03e2c54ea5
commit 658750494f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 51 additions and 11 deletions

40
.github/workflows/verify-build.yml vendored Normal file
View File

@ -0,0 +1,40 @@
name: Verify Build Output
on:
pull_request:
branches:
- main
- master
jobs:
verify-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
- name: Install dependencies
run: |
npm ci
- name: Build
run: npm run build
- name: Check for changes
run: |
# Ignore yarn.lock changes since we're using npm
git update-index --assume-unchanged yarn.lock || true
if [[ -n "$(git status --porcelain)" ]]; then
echo "::error::Build generated new changes. Please commit the generated files."
git status
git diff
exit 1
fi

20
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long