Drop unused workflow for now #97
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check dist/ | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
workflow_dispatch: | |
jobs: | |
check-dist: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set Node.js 16.x | |
uses: actions/[email protected] | |
with: | |
node-version: 16.x | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 8 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Rebuild the dist/ directories | |
run: | | |
pnpm run -r build | |
pnpm run -r package | |
- name: Compare the expected and actual dist/ directories | |
run: | | |
directories=("actions/deploy/dist" "actions/pull-request-diff/dist") # Add or remove directories as necessary | |
for dir in "${directories[@]}"; do | |
if [ "$(git diff --ignore-space-at-eol $dir | wc -l)" -gt "0" ]; then | |
echo "Detected uncommitted changes in $dir after build. See status below:" | |
git diff $dir | |
exit 1 | |
fi | |
done | |
id: diff | |
# If index.js was different than expected, upload the expected versions as artifacts | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
if: ${{ failure() && steps.diff.conclusion == 'failure' }} | |
with: | |
name: dist | |
path: | | |
actions/deploy/dist | |
actions/pull-request-diff/dist |