feat(metadata): bump @salesforce/source-deploy-retrieve from 12.31.24 to 12.31.25 #132
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Dependabot Auto-Merge | |
| on: pull_request | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| dependabot: | |
| runs-on: ubuntu-latest | |
| if: github.actor == 'dependabot[bot]' | |
| steps: | |
| - name: Dependabot metadata | |
| id: metadata | |
| uses: dependabot/fetch-metadata@v2 | |
| with: | |
| github-token: "${{ secrets.GITHUB_TOKEN }}" | |
| - name: Checkout PR branch | |
| if: steps.metadata.outputs.package-ecosystem == 'npm_and_yarn' && contains(steps.metadata.outputs.dependency-names, '@salesforce/source-deploy-retrieve') | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| token: ${{ secrets.RELEASE_PAT }} | |
| - name: Setup Node | |
| if: steps.metadata.outputs.package-ecosystem == 'npm_and_yarn' && contains(steps.metadata.outputs.dependency-names, '@salesforce/source-deploy-retrieve') | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| - name: Install dependencies | |
| if: steps.metadata.outputs.package-ecosystem == 'npm_and_yarn' && contains(steps.metadata.outputs.dependency-names, '@salesforce/source-deploy-retrieve') | |
| run: HUSKY=0 npm ci | |
| - name: Build | |
| if: steps.metadata.outputs.package-ecosystem == 'npm_and_yarn' && contains(steps.metadata.outputs.dependency-names, '@salesforce/source-deploy-retrieve') | |
| run: npm run build | |
| - name: Sync internal registry with SDR | |
| if: steps.metadata.outputs.package-ecosystem == 'npm_and_yarn' && contains(steps.metadata.outputs.dependency-names, '@salesforce/source-deploy-retrieve') | |
| run: | | |
| npm run sync:registry | |
| npm run build | |
| npm run lint:fix | |
| - name: Update e2e expected files API version | |
| if: steps.metadata.outputs.package-ecosystem == 'npm_and_yarn' && contains(steps.metadata.outputs.dependency-names, '@salesforce/source-deploy-retrieve') | |
| run: | | |
| # Extract new API version from the updated SDR | |
| NEW_VERSION=$(node -e "import('@salesforce/source-deploy-retrieve').then(m => m.getCurrentApiVersion()).then(v => process.stdout.write(v + '.0'))") | |
| # Fetch and checkout e2e/head in a worktree | |
| git fetch origin e2e/head | |
| git worktree add /tmp/e2e-head origin/e2e/head | |
| # Update <version> tags in expected XML package manifests | |
| cd /tmp/e2e-head | |
| find expected/package expected/destructiveChanges -name "*.xml" -exec sed -i "s|<version>[0-9.]*</version>|<version>${NEW_VERSION}</version>|g" {} + | |
| # Amend the last commit if version changed | |
| if ! git diff --quiet; then | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add expected/package expected/destructiveChanges | |
| git commit --amend --no-edit | |
| git push --force-with-lease origin HEAD:e2e/head | |
| fi | |
| # Clean up worktree | |
| cd - | |
| git worktree remove /tmp/e2e-head | |
| - name: Commit and push if changed | |
| if: steps.metadata.outputs.package-ecosystem == 'npm_and_yarn' && contains(steps.metadata.outputs.dependency-names, '@salesforce/source-deploy-retrieve') | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add src/metadata/internalRegistry.ts | |
| git diff --staged --quiet || git commit -m "feat(metadata): sync internal registry with SDR update" | |
| git push | |
| - name: Enable auto-merge for Dependabot PRs | |
| # Only for SDR updates in npm ecosystem | |
| if: steps.metadata.outputs.package-ecosystem == 'npm_and_yarn' && contains(steps.metadata.outputs.dependency-names, '@salesforce/source-deploy-retrieve') | |
| run: | | |
| gh pr review --approve "$PR_URL" | |
| gh pr merge --auto --squash "$PR_URL" | |
| env: | |
| PR_URL: ${{github.event.pull_request.html_url}} | |
| GITHUB_TOKEN: ${{secrets.RELEASE_PAT}} |