name: check dist/ on: push: branches: - master paths-ignore: - "**.md" pull_request: paths-ignore: - "**.md" workflow_dispatch: permissions: {} jobs: check-dist: if: github.repository == 'Swatinem/rust-cache' runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - name: Setup Node.js 24.x uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 with: node-version: 24.x cache: npm - name: Install dependencies run: npm ci - name: Rebuild the dist/ directory run: npm run prepare - name: Compare the expected and actual dist/ directories run: | if [ "$(git diff dist/ | wc -l)" -gt "0" ]; then echo "Detected uncommitted changes after build. See status below:" git diff exit 1 fi id: diff - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 if: ${{ failure() && steps.diff.conclusion == 'failure' }} with: name: dist path: dist/