generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 4
41 lines (40 loc) · 1.05 KB
/
check-dist.generated.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Do not modify!
# This file was generated from a template using https://github.com/StefMa/pkl-gha
name: Check Transpiled JavaScript
'on':
pull_request: {}
push:
branches:
- main
permissions:
contents: read
jobs:
check-dist:
name: Check Dist
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Install Dependencies
run: npm ci
- name: Build dist/ Directory
run: npm run bundle
- name: Compare Directories
id: diff
run: |-
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff --ignore-space-at-eol --text dist/
exit 1
fi
- name: Upload Artifact
if: ${{ failure() && steps.diff.outcome == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: dist
path: dist