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

View File

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