diff --git a/.github/workflows/update-yarn-lock.yml b/.github/workflows/update-yarn-lock.yml new file mode 100644 index 0000000..11a3121 --- /dev/null +++ b/.github/workflows/update-yarn-lock.yml @@ -0,0 +1,33 @@ +name: Update yarn.lock file +on: + push: + branches: [main] +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: latest + + - name: Setup Git + run: | + git config --local user.email "actions@github.com" + git config --local user.name "Github Actions" + + - run: yarn install + env: + YARN_ENABLE_IMMUTABLE_INSTALLS: false + + - name: Check for changes + id: check_changes + run: | + if git diff --exit-code; then + echo "No changes to commit." + else + git config --local user.email "actions@github.com" + git config --local user.name "Github Actions" + git commit -a -m "chore: update yarn.lock" + git push + fi