From 944a7dc4a2364aeedc9bf5dc83866bd90f74bf4f Mon Sep 17 00:00:00 2001 From: jongwooo Date: Thu, 15 Dec 2022 15:16:45 +0900 Subject: [PATCH] Create check-dist.yml Signed-off-by: jongwooo --- .github/workflows/check-dist.yml | 50 ++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/check-dist.yml diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml new file mode 100644 index 0000000..3a5e417 --- /dev/null +++ b/.github/workflows/check-dist.yml @@ -0,0 +1,50 @@ +name: check dist/ + +on: + push: + branches: + - master + paths-ignore: + - '**.md' + pull_request: + paths-ignore: + - '**.md' + workflow_dispatch: + +jobs: + check-dist: + runs-on: ubuntu-latest + + steps: + - + name: Checkout + uses: actions/checkout@v3 + + - + name: Set Node.js 16.x + uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: yarn + + - + name: Install Dependencies + run: yarn install --frozen-lockfile + + - + name: Compare the expected and actual dist/ directories + run: | + if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then + echo "Detected uncommitted changes after build. See status below:" + git diff + exit 1 + fi + id: diff + + - + name: Upload the expected version as an artifact + uses: actions/upload-artifact@v2 + if: ${{ failure() && steps.diff.conclusion == 'failure' }} + with: + name: dist + path: dist/