diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 407dfffd..f87a1fdd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,10 +35,12 @@ jobs: git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/" - name: Restore Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 id: yarn-cache with: - path: .yarn/cache + path: | + node_modules + .yarn/install-state.gz key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4e6f0134..8fe008d8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -35,10 +35,12 @@ jobs: git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/" - name: Restore Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 id: yarn-cache with: - path: .yarn/cache + path: | + node_modules + .yarn/install-state.gz key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- diff --git a/.github/workflows/manual-release.yml b/.github/workflows/manual-release.yml index ff062dde..ee4c0891 100644 --- a/.github/workflows/manual-release.yml +++ b/.github/workflows/manual-release.yml @@ -44,10 +44,12 @@ jobs: git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/" - name: Restore Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 id: yarn-cache with: - path: .yarn/cache + path: | + node_modules + .yarn/install-state.gz key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 51171f02..33051942 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -43,10 +43,12 @@ jobs: git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/" - name: Restore Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 id: yarn-cache with: - path: .yarn/cache + path: | + node_modules + .yarn/install-state.gz key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fe8f6453..328dca54 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,10 +36,12 @@ jobs: git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/" - name: Restore Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 id: yarn-cache with: - path: .yarn/cache + path: | + node_modules + .yarn/install-state.gz key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml index b214a9ac..04416c9a 100644 --- a/.github/workflows/update-version.yml +++ b/.github/workflows/update-version.yml @@ -48,7 +48,9 @@ jobs: uses: actions/cache@v4 id: yarn-cache with: - path: .yarn/cache + path: | + node_modules + .yarn/install-state.gz key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- @@ -143,11 +145,24 @@ jobs: > **Note:** This PR was created with force mode enabled." fi - gh pr create \ + # Create PR + PR_URL=$(gh pr create \ --title "chore: update WhatsApp Web version" \ --body "$PR_BODY" \ --base master \ - --head "$BRANCH_NAME" || echo "PR already exists or could not be created" + --head "$BRANCH_NAME" 2>&1) || true + + if [[ "$PR_URL" == *"github.com"* ]]; then + echo "PR created: $PR_URL" + + # Auto-merge the PR (squash merge) + echo "Attempting to auto-merge..." + gh pr merge "$BRANCH_NAME" --squash --auto --delete-branch || \ + gh pr merge "$BRANCH_NAME" --squash --delete-branch || \ + echo "Auto-merge not available - PR created for manual review" + else + echo "PR already exists or could not be created: $PR_URL" + fi - name: Summary run: |