mirror of
https://github.com/actions/javascript-action.git
synced 2025-04-07 07:49:42 +00:00
Add missing dist check
This commit is contained in:
11
.github/workflows/check-dist.yml
vendored
11
.github/workflows/check-dist.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
# In JavaScript actions, `dist/` is a special directory. When you reference
|
# In TypeScript actions, `dist/` is a special directory. When you reference
|
||||||
# an action with the `uses:` property, `dist/index.js` is the code that will be
|
# an action with the `uses:` property, `dist/index.js` is the code that will be
|
||||||
# run. For this project, the `dist/index.js` file is transpiled from other
|
# run. For this project, the `dist/index.js` file is transpiled from other
|
||||||
# source files. This workflow ensures the `dist/` directory contains the
|
# source files. This workflow ensures the `dist/` directory contains the
|
||||||
@ -25,10 +25,6 @@ jobs:
|
|||||||
name: Check dist/
|
name: Check dist/
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
statuses: write
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
id: checkout
|
id: checkout
|
||||||
@ -54,6 +50,11 @@ jobs:
|
|||||||
- name: Compare Directories
|
- name: Compare Directories
|
||||||
id: diff
|
id: diff
|
||||||
run: |
|
run: |
|
||||||
|
if [ ! -d dist/ ]; then
|
||||||
|
echo "Expected dist/ directory does not exist. See status below:"
|
||||||
|
ls -la ./
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
|
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
|
||||||
echo "Detected uncommitted changes after build. See status below:"
|
echo "Detected uncommitted changes after build. See status below:"
|
||||||
git diff --ignore-space-at-eol --text dist/
|
git diff --ignore-space-at-eol --text dist/
|
||||||
|
Reference in New Issue
Block a user