From efdf36d38c82ed9b5ce5e02bce934910988f4088 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Fri, 20 Sep 2024 19:18:02 -0700 Subject: [PATCH] ci: commit the dist after the build --- .github/workflows/CI.yml | 12 ++++++++---- cspell.config.yaml | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 53b9e5c1..b12b76f6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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 diff --git a/cspell.config.yaml b/cspell.config.yaml index cd6d0d80..072d75fd 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -78,6 +78,7 @@ words: - nodistro - NOPASSWD - noprogressbar + - noreply - nothrow - npmrc - Opencppcoverage