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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Setup Node.js 24.x uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.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@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 if: ${{ failure() && steps.diff.conclusion == 'failure' }} with: name: dist path: dist/