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@820762786026740c76f36085b0efc47a31fe5020 # v7.0.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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 if: ${{ failure() && steps.diff.conclusion == 'failure' }} with: name: dist path: dist/