ci: commit the dist after the build

This commit is contained in:
Amin Yahyaabadi 2024-09-20 19:18:02 -07:00
parent 48bca6ce1e
commit efdf36d38c
No known key found for this signature in database
GPG Key ID: F52AF77F636088F0
2 changed files with 9 additions and 4 deletions

View File

@ -56,13 +56,17 @@ jobs:
run: |
pnpm run test.lint
- name: Validate Dist
- name: Update Dist
run: |
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff --ignore-space-at-eol --text dist/ ':(exclude)*.js.map'
exit 1
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add dist/
git commit -m "chore(build): update dist"
git push
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Dist
uses: actions/upload-artifact@v3

View File

@ -78,6 +78,7 @@ words:
- nodistro
- NOPASSWD
- noprogressbar
- noreply
- nothrow
- npmrc
- Opencppcoverage