-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (37 loc) · 1.03 KB
/
check_dist.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
42
43
44
45
46
name: 'Check Transpiled JavaScript'
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
jobs:
check-dist:
name: 'Check dist/'
runs-on: ubuntu-latest
steps:
- name: 'Setup Repository (${{github.event.repository.name}})'
uses: actions/checkout@v4
- name: 'Setup Deno'
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: 'Build dist/ Directory'
run: |
deno task install
deno task build
- 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/