From 65726c90fd5568d1269bf4ebfb4926b9ea4dd1e1 Mon Sep 17 00:00:00 2001 From: peternhale Date: Wed, 12 Aug 2026 14:21:48 -0600 Subject: [PATCH 1/5] fix: support package manager retries in VS Code promotion --- .../actions/npmInstallWithRetries/action.yml | 2 +- .github/actions/updateNodeLockfile/action.yml | 60 ++++++++++ .github/workflows/vscode-manual-publish.yml | 111 +++++++++++++++--- .../workflows/vscode-promote-prerelease.yml | 3 - .github/workflows/vscode-promote-stable.yml | 110 +++++++++++++---- 5 files changed, 247 insertions(+), 39 deletions(-) create mode 100644 .github/actions/updateNodeLockfile/action.yml diff --git a/.github/actions/npmInstallWithRetries/action.yml b/.github/actions/npmInstallWithRetries/action.yml index 30c64cf..78e9829 100644 --- a/.github/actions/npmInstallWithRetries/action.yml +++ b/.github/actions/npmInstallWithRetries/action.yml @@ -1,5 +1,5 @@ name: npm-install-with-retries -description: 'wraps npm install with retries/timeout to handle network failures' +description: 'Wraps npm ci with retries and timeouts. New workflows should use setupNodeAndInstall for package-manager-agnostic installation.' inputs: ignore-scripts: default: 'false' diff --git a/.github/actions/updateNodeLockfile/action.yml b/.github/actions/updateNodeLockfile/action.yml new file mode 100644 index 0000000..3e4ceca --- /dev/null +++ b/.github/actions/updateNodeLockfile/action.yml @@ -0,0 +1,60 @@ +name: Update Node lockfile +description: Refreshes an npm, pnpm, or Yarn lockfile with retries and without lifecycle scripts. +inputs: + package-manager: + description: 'Package manager to use: npm, pnpm, or yarn.' + required: true + package-manager-version: + description: 'pnpm version to install when package-manager is pnpm.' + required: false + default: '10' + lockfile-path: + description: 'Path to the lockfile to refresh.' + required: true +runs: + using: composite + steps: + - name: Validate package manager and lockfile + shell: bash + env: + PACKAGE_MANAGER: ${{ inputs.package-manager }} + LOCKFILE_PATH: ${{ inputs.lockfile-path }} + run: | + case "$PACKAGE_MANAGER" in + npm|pnpm|yarn) ;; + *) echo "Unsupported package manager: $PACKAGE_MANAGER"; exit 1 ;; + esac + [ -f "$LOCKFILE_PATH" ] || { echo "Lockfile not found: $LOCKFILE_PATH"; exit 1; } + + - name: Setup pnpm + if: inputs.package-manager == 'pnpm' + uses: pnpm/action-setup@v4 + with: + version: ${{ inputs.package-manager-version }} + + - name: Resolve lockfile update command + id: command + shell: bash + env: + PACKAGE_MANAGER: ${{ inputs.package-manager }} + LOCKFILE_PATH: ${{ inputs.lockfile-path }} + run: | + LOCKFILE_DIR=$(dirname "$LOCKFILE_PATH") + case "$PACKAGE_MANAGER" in + npm) COMMAND="cd '$LOCKFILE_DIR' && npm install --package-lock-only --ignore-scripts" ;; + pnpm) COMMAND="cd '$LOCKFILE_DIR' && pnpm install --lockfile-only --ignore-scripts" ;; + yarn) + YARN_MAJOR=$(yarn --version | cut -d. -f1) + if [ "$YARN_MAJOR" -ge 2 ]; then + COMMAND="cd '$LOCKFILE_DIR' && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install --mode=skip-build" + else + COMMAND="cd '$LOCKFILE_DIR' && yarn install --ignore-scripts" + fi + ;; + esac + echo "value=$COMMAND" >> "$GITHUB_OUTPUT" + + - name: Refresh lockfile with retries + uses: salesforcecli/github-workflows/.github/actions/retry@main + with: + command: ${{ steps.command.outputs.value }} diff --git a/.github/workflows/vscode-manual-publish.yml b/.github/workflows/vscode-manual-publish.yml index 78ed14e..ace8c31 100644 --- a/.github/workflows/vscode-manual-publish.yml +++ b/.github/workflows/vscode-manual-publish.yml @@ -22,7 +22,7 @@ name: Manual Publish VS Code Extension # # Requirements - calling repository must have: # - Secrets: IDEE_GH_TOKEN, VSCE_PERSONAL_ACCESS_TOKEN, IDEE_OVSX_PAT -# - Action: ./.github/actions/npm-install-with-retries (custom npm install with retry logic) +# - The package manager and lockfile inputs must match the caller repository. # - Action: ./.github/actions/check-ci-status (validates CI checks passed before publish) # - Action: ./.github/actions/repackage-vsix-stable (repackages pre-release VSIX as stable) # - Action: ./.github/actions/publish-vsix (publishes to VS Code Marketplace and/or Open VSX) @@ -106,6 +106,31 @@ on: required: false default: "22.x" type: string + package-manager: + description: "Package manager to use: npm, pnpm, or yarn" + required: false + default: "npm" + type: string + package-manager-version: + description: "pnpm version to use when package-manager is pnpm" + required: false + default: "10" + type: string + cache-dependency-path: + description: "Path to the package manager lockfile" + required: false + default: "package-lock.json" + type: string + lockfile-path: + description: "Single lockfile path to update and commit with the stable version" + required: false + default: "package-lock.json" + type: string + install-command: + description: "Command used to install dependencies" + required: false + default: "npm ci" + type: string workflow_dispatch: inputs: extension-name: @@ -187,6 +212,32 @@ on: required: false default: "22.x" type: string + package-manager: + description: "Package manager to use: npm, pnpm, or yarn" + required: false + default: "npm" + type: choice + options: [npm, pnpm, yarn] + package-manager-version: + description: "pnpm version to use when package-manager is pnpm" + required: false + default: "10" + type: string + cache-dependency-path: + description: "Path to the package manager lockfile" + required: false + default: "package-lock.json" + type: string + lockfile-path: + description: "Single lockfile path to update and commit with the stable version" + required: false + default: "package-lock.json" + type: string + install-command: + description: "Command used to install dependencies" + required: false + default: "npm ci" + type: string concurrency: group: manual-publish @@ -253,13 +304,14 @@ jobs: fetch-depth: 0 token: ${{ secrets.IDEE_GH_TOKEN }} - - name: Setup Node.js - uses: actions/setup-node@v6 + - name: Setup Node.js and install dependencies + uses: salesforcecli/github-workflows/.github/actions/setupNodeAndInstall@main with: node-version: ${{ inputs.node-version || '22.x' }} - - - name: Install dependencies - uses: ./.github/actions/npm-install-with-retries + package-manager: ${{ inputs.package-manager }} + package-manager-version: ${{ inputs.package-manager-version }} + cache-dependency-path: ${{ inputs.cache-dependency-path }} + install-command: ${{ inputs.install-command }} - name: Resolve source and compute versions id: resolve @@ -612,6 +664,12 @@ jobs: with: node-version: ${{ inputs.node-version || '22.x' }} + - name: Setup pnpm + if: inputs.package-manager == 'pnpm' + uses: pnpm/action-setup@v4 + with: + version: ${{ inputs.package-manager-version }} + - name: Download source VSIX uses: actions/download-artifact@v8 with: @@ -677,9 +735,6 @@ jobs: with: node-version: ${{ inputs.node-version || '22.x' }} - - name: Install dependencies - uses: ./.github/actions/npm-install-with-retries - - name: Download VSIX uses: actions/download-artifact@v8 with: @@ -845,7 +900,8 @@ jobs: with: node-version: ${{ inputs.node-version || '22.x' }} - - name: Commit stable version bump to main + - name: Update stable version + id: update-version env: STABLE_VERSION: ${{ needs.prepare.outputs.stable-version }} DRY_RUN: ${{ inputs.dry-run || 'false' }} @@ -876,11 +932,13 @@ jobs: ') if [ "$IS_GT" != "yes" ]; then echo "Skipping commit-back: main ($CURRENT_VERSION) is already >= stable ($STABLE_VERSION)" + echo "should-commit=false" >> "$GITHUB_OUTPUT" exit 0 fi if [ "$DRY_RUN" = "true" ]; then echo "DRY RUN: Would set $PKG_DIR to $STABLE_VERSION and commit to main" + echo "should-commit=false" >> "$GITHUB_OUTPUT" exit 0 fi @@ -890,12 +948,35 @@ jobs: ( cd "$PKG_DIR" && npm version "$STABLE_VERSION" --no-git-tag-version ) - npm install --package-lock-only --ignore-scripts + git add "$PKG_DIR/package.json" + if git diff --cached --quiet -- "$PKG_DIR/package.json"; then + echo "Package version was not updated: $PKG_DIR/package.json" + exit 1 + fi + echo "should-commit=true" >> "$GITHUB_OUTPUT" - git add "$PKG_DIR/package.json" package-lock.json - if git diff --staged --quiet; then - echo "No version change to commit - skipping (idempotent rerun)" - exit 0 + - name: Refresh lockfile with retries + if: steps.update-version.outputs.should-commit == 'true' + uses: salesforcecli/github-workflows/.github/actions/updateNodeLockfile@main + with: + package-manager: ${{ inputs.package-manager }} + package-manager-version: ${{ inputs.package-manager-version }} + lockfile-path: ${{ inputs.lockfile-path }} + + - name: Commit stable version bump + if: steps.update-version.outputs.should-commit == 'true' + env: + STABLE_VERSION: ${{ needs.prepare.outputs.stable-version }} + EXTENSION_NAME: ${{ inputs.extension-name }} + EXTENSIONS_ROOT: ${{ inputs.extensions-root }} + LOCKFILE_PATH: ${{ inputs.lockfile-path }} + run: | + set -euo pipefail + git add "$LOCKFILE_PATH" + if [ -n "$(git diff --name-only)" ]; then + echo "Lockfile refresh produced unstaged changes:" + git diff --name-only + exit 1 fi git commit -m "chore: set stable version $STABLE_VERSION [skip ci]" diff --git a/.github/workflows/vscode-promote-prerelease.yml b/.github/workflows/vscode-promote-prerelease.yml index c101c5f..9f79a24 100644 --- a/.github/workflows/vscode-promote-prerelease.yml +++ b/.github/workflows/vscode-promote-prerelease.yml @@ -210,9 +210,6 @@ jobs: with: node-version: ${{ inputs.node-version || '22.x' }} - - name: Install dependencies - uses: salesforcecli/github-workflows/.github/actions/npmInstallWithRetries@main - - name: Download VSIX from nightly GitHub release env: GH_TOKEN: ${{ secrets.IDEE_GH_TOKEN }} diff --git a/.github/workflows/vscode-promote-stable.yml b/.github/workflows/vscode-promote-stable.yml index 50c2997..fa65d73 100644 --- a/.github/workflows/vscode-promote-stable.yml +++ b/.github/workflows/vscode-promote-stable.yml @@ -22,7 +22,7 @@ name: Promote Pre-release to Stable # - Secrets: IDEE_GH_TOKEN, VSCE_PERSONAL_ACCESS_TOKEN, IDEE_OVSX_PAT # - Action: ./.github/actions/repackage-vsix-stable (repackages pre-release VSIX as stable) # - Action: ./.github/actions/publish-vsix (publishes to VS Code Marketplace and/or Open VSX) -# - Action: ./.github/actions/npm-install-with-retries (custom npm install with retry logic) +# - The package manager and lockfile inputs must match the caller repository. # # Note: This workflow uses local actions from the calling repository. For a fully self-contained # workflow that doesn't require local actions, use vscode-promote-prerelease.yml instead. @@ -63,6 +63,31 @@ on: required: false default: '22.x' type: string + package-manager: + description: 'Package manager to use: npm, pnpm, or yarn' + required: false + default: 'npm' + type: string + package-manager-version: + description: 'pnpm version to use when package-manager is pnpm' + required: false + default: '10' + type: string + cache-dependency-path: + description: 'Path to the package manager lockfile' + required: false + default: 'package-lock.json' + type: string + lockfile-path: + description: 'Single lockfile path to update and commit with the stable version' + required: false + default: 'package-lock.json' + type: string + install-command: + description: 'Command used to install dependencies' + required: false + default: 'npm ci' + type: string workflow_dispatch: inputs: extension-name: @@ -100,6 +125,32 @@ on: required: false default: '22.x' type: string + package-manager: + description: 'Package manager to use: npm, pnpm, or yarn' + required: false + default: 'npm' + type: choice + options: [npm, pnpm, yarn] + package-manager-version: + description: 'pnpm version to use when package-manager is pnpm' + required: false + default: '10' + type: string + cache-dependency-path: + description: 'Path to the package manager lockfile' + required: false + default: 'package-lock.json' + type: string + lockfile-path: + description: 'Single lockfile path to update and commit with the stable version' + required: false + default: 'package-lock.json' + type: string + install-command: + description: 'Command used to install dependencies' + required: false + default: 'npm ci' + type: string concurrency: group: promote-stable @@ -125,13 +176,14 @@ jobs: fetch-depth: 0 token: ${{ secrets.IDEE_GH_TOKEN }} - - name: Setup Node.js - uses: actions/setup-node@v6 + - name: Setup Node.js and install dependencies + uses: salesforcecli/github-workflows/.github/actions/setupNodeAndInstall@main with: node-version: ${{ inputs.node-version || '22.x' }} - - - name: Install dependencies - uses: ./.github/actions/npm-install-with-retries + package-manager: ${{ inputs.package-manager }} + package-manager-version: ${{ inputs.package-manager-version }} + cache-dependency-path: ${{ inputs.cache-dependency-path }} + install-command: ${{ inputs.install-command }} - name: Find latest pre-release candidate and compute stable version id: find @@ -292,9 +344,6 @@ jobs: with: node-version: ${{ inputs.node-version || '22.x' }} - - name: Install dependencies - uses: ./.github/actions/npm-install-with-retries - - name: Download stable VSIX artifact uses: actions/download-artifact@v8 with: @@ -459,7 +508,8 @@ jobs: with: node-version: ${{ inputs.node-version || '22.x' }} - - name: Commit stable version bump to main + - name: Update stable version + id: update-version env: STABLE_VERSION: ${{ needs.find-prerelease-candidate.outputs.stable-version }} DRY_RUN: ${{ inputs.dry-run || 'false' }} @@ -481,11 +531,13 @@ jobs: fi if [ "$IS_GT" != "yes" ]; then echo "Skipping commit-back: main ($CURRENT_VERSION) is already >= stable ($STABLE_VERSION)" + echo "should-commit=false" >> "$GITHUB_OUTPUT" exit 0 fi if [ "$DRY_RUN" = "true" ]; then echo "DRY RUN: Would set $PKG_DIR to $STABLE_VERSION and commit to main" + echo "should-commit=false" >> "$GITHUB_OUTPUT" exit 0 fi @@ -495,17 +547,35 @@ jobs: ( cd "$PKG_DIR" && npm version "$STABLE_VERSION" --no-git-tag-version ) - # Keep the root lockfile's workspace entry in sync with package.json. - # --package-lock-only rewrites package-lock.json from the manifests - # without installing node_modules, so the lockfile never drifts behind - # the committed version. This commit carries [skip ci], so nothing - # downstream re-derives the lockfile — it must be correct here. - npm install --package-lock-only --ignore-scripts + git add "$PKG_DIR/package.json" + if git diff --cached --quiet -- "$PKG_DIR/package.json"; then + echo "Package version was not updated: $PKG_DIR/package.json" + exit 1 + fi + echo "should-commit=true" >> "$GITHUB_OUTPUT" - git add "$PKG_DIR/package.json" package-lock.json - if git diff --staged --quiet; then - echo "No version change to commit - skipping (idempotent rerun)" - exit 0 + - name: Refresh lockfile with retries + if: steps.update-version.outputs.should-commit == 'true' + uses: salesforcecli/github-workflows/.github/actions/updateNodeLockfile@main + with: + package-manager: ${{ inputs.package-manager }} + package-manager-version: ${{ inputs.package-manager-version }} + lockfile-path: ${{ inputs.lockfile-path }} + + - name: Commit stable version bump + if: steps.update-version.outputs.should-commit == 'true' + env: + STABLE_VERSION: ${{ needs.find-prerelease-candidate.outputs.stable-version }} + EXTENSION_NAME: ${{ inputs.extension-name }} + EXTENSIONS_ROOT: ${{ inputs.extensions-root }} + LOCKFILE_PATH: ${{ inputs.lockfile-path }} + run: | + set -euo pipefail + git add "$LOCKFILE_PATH" + if [ -n "$(git diff --name-only)" ]; then + echo "Lockfile refresh produced unstaged changes:" + git diff --name-only + exit 1 fi git commit -m "chore: set stable version $STABLE_VERSION [skip ci]" From de7d56d709e54e20a8916da59a49483c21995bdc Mon Sep 17 00:00:00 2001 From: peternhale Date: Wed, 12 Aug 2026 14:36:14 -0600 Subject: [PATCH 2/5] test: use workflow branch action references --- .github/actions/npmInstallWithRetries/action.yml | 2 +- .github/actions/setupNodeAndInstall/action.yml | 6 +++--- .github/actions/updateNodeLockfile/action.yml | 2 +- .github/actions/yarnInstallWithRetries/action.yml | 2 +- .github/workflows/vscode-manual-publish.yml | 4 ++-- .github/workflows/vscode-promote-stable.yml | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/actions/npmInstallWithRetries/action.yml b/.github/actions/npmInstallWithRetries/action.yml index 78e9829..3864485 100644 --- a/.github/actions/npmInstallWithRetries/action.yml +++ b/.github/actions/npmInstallWithRetries/action.yml @@ -11,6 +11,6 @@ runs: run: npm config set fetch-timeout 600000 shell: bash - name: npm ci - uses: salesforcecli/github-workflows/.github/actions/retry@main + uses: salesforcecli/github-workflows/.github/actions/retry@ph/W-23832274-pnpm-stable-promotion with: command: npm ci --no-audit --no-fund ${{ inputs.ignore-scripts == 'true' && '--ignore-scripts' || '' }} diff --git a/.github/actions/setupNodeAndInstall/action.yml b/.github/actions/setupNodeAndInstall/action.yml index 184e11a..b716640 100644 --- a/.github/actions/setupNodeAndInstall/action.yml +++ b/.github/actions/setupNodeAndInstall/action.yml @@ -63,14 +63,14 @@ runs: - name: Install npm dependencies if: inputs.package-manager == 'npm' && steps.install-command.outputs.value == 'npm ci' - uses: salesforcecli/github-workflows/.github/actions/npmInstallWithRetries@main + uses: salesforcecli/github-workflows/.github/actions/npmInstallWithRetries@ph/W-23832274-pnpm-stable-promotion - name: Install Yarn dependencies if: inputs.package-manager == 'yarn' && steps.install-command.outputs.value == 'yarn install --network-timeout 600000' - uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main + uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@ph/W-23832274-pnpm-stable-promotion - name: Install custom or pnpm dependencies if: (inputs.package-manager != 'npm' || steps.install-command.outputs.value != 'npm ci') && (inputs.package-manager != 'yarn' || steps.install-command.outputs.value != 'yarn install --network-timeout 600000') - uses: salesforcecli/github-workflows/.github/actions/retry@main + uses: salesforcecli/github-workflows/.github/actions/retry@ph/W-23832274-pnpm-stable-promotion with: command: ${{ steps.install-command.outputs.value }} diff --git a/.github/actions/updateNodeLockfile/action.yml b/.github/actions/updateNodeLockfile/action.yml index 3e4ceca..f196e08 100644 --- a/.github/actions/updateNodeLockfile/action.yml +++ b/.github/actions/updateNodeLockfile/action.yml @@ -55,6 +55,6 @@ runs: echo "value=$COMMAND" >> "$GITHUB_OUTPUT" - name: Refresh lockfile with retries - uses: salesforcecli/github-workflows/.github/actions/retry@main + uses: salesforcecli/github-workflows/.github/actions/retry@ph/W-23832274-pnpm-stable-promotion with: command: ${{ steps.command.outputs.value }} diff --git a/.github/actions/yarnInstallWithRetries/action.yml b/.github/actions/yarnInstallWithRetries/action.yml index 439f758..8781514 100644 --- a/.github/actions/yarnInstallWithRetries/action.yml +++ b/.github/actions/yarnInstallWithRetries/action.yml @@ -8,6 +8,6 @@ runs: using: composite steps: - name: yarn install - uses: salesforcecli/github-workflows/.github/actions/retry@main + uses: salesforcecli/github-workflows/.github/actions/retry@ph/W-23832274-pnpm-stable-promotion with: command: yarn install --network-timeout 600000 ${{ inputs.ignore-scripts == 'true' && '--ignore-scripts' || '' }} diff --git a/.github/workflows/vscode-manual-publish.yml b/.github/workflows/vscode-manual-publish.yml index ace8c31..b077031 100644 --- a/.github/workflows/vscode-manual-publish.yml +++ b/.github/workflows/vscode-manual-publish.yml @@ -305,7 +305,7 @@ jobs: token: ${{ secrets.IDEE_GH_TOKEN }} - name: Setup Node.js and install dependencies - uses: salesforcecli/github-workflows/.github/actions/setupNodeAndInstall@main + uses: salesforcecli/github-workflows/.github/actions/setupNodeAndInstall@ph/W-23832274-pnpm-stable-promotion with: node-version: ${{ inputs.node-version || '22.x' }} package-manager: ${{ inputs.package-manager }} @@ -957,7 +957,7 @@ jobs: - name: Refresh lockfile with retries if: steps.update-version.outputs.should-commit == 'true' - uses: salesforcecli/github-workflows/.github/actions/updateNodeLockfile@main + uses: salesforcecli/github-workflows/.github/actions/updateNodeLockfile@ph/W-23832274-pnpm-stable-promotion with: package-manager: ${{ inputs.package-manager }} package-manager-version: ${{ inputs.package-manager-version }} diff --git a/.github/workflows/vscode-promote-stable.yml b/.github/workflows/vscode-promote-stable.yml index fa65d73..c641aae 100644 --- a/.github/workflows/vscode-promote-stable.yml +++ b/.github/workflows/vscode-promote-stable.yml @@ -177,7 +177,7 @@ jobs: token: ${{ secrets.IDEE_GH_TOKEN }} - name: Setup Node.js and install dependencies - uses: salesforcecli/github-workflows/.github/actions/setupNodeAndInstall@main + uses: salesforcecli/github-workflows/.github/actions/setupNodeAndInstall@ph/W-23832274-pnpm-stable-promotion with: node-version: ${{ inputs.node-version || '22.x' }} package-manager: ${{ inputs.package-manager }} @@ -556,7 +556,7 @@ jobs: - name: Refresh lockfile with retries if: steps.update-version.outputs.should-commit == 'true' - uses: salesforcecli/github-workflows/.github/actions/updateNodeLockfile@main + uses: salesforcecli/github-workflows/.github/actions/updateNodeLockfile@ph/W-23832274-pnpm-stable-promotion with: package-manager: ${{ inputs.package-manager }} package-manager-version: ${{ inputs.package-manager-version }} From c30e756bb58d21a1ba8352c8799f3ca37de72bcc Mon Sep 17 00:00:00 2001 From: peternhale Date: Wed, 12 Aug 2026 15:03:12 -0600 Subject: [PATCH 3/5] fix: retain stable retry action references --- .github/actions/npmInstallWithRetries/action.yml | 2 +- .github/actions/setupNodeAndInstall/action.yml | 2 +- .github/actions/updateNodeLockfile/action.yml | 2 +- .github/actions/yarnInstallWithRetries/action.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/npmInstallWithRetries/action.yml b/.github/actions/npmInstallWithRetries/action.yml index 3864485..78e9829 100644 --- a/.github/actions/npmInstallWithRetries/action.yml +++ b/.github/actions/npmInstallWithRetries/action.yml @@ -11,6 +11,6 @@ runs: run: npm config set fetch-timeout 600000 shell: bash - name: npm ci - uses: salesforcecli/github-workflows/.github/actions/retry@ph/W-23832274-pnpm-stable-promotion + uses: salesforcecli/github-workflows/.github/actions/retry@main with: command: npm ci --no-audit --no-fund ${{ inputs.ignore-scripts == 'true' && '--ignore-scripts' || '' }} diff --git a/.github/actions/setupNodeAndInstall/action.yml b/.github/actions/setupNodeAndInstall/action.yml index b716640..660ecee 100644 --- a/.github/actions/setupNodeAndInstall/action.yml +++ b/.github/actions/setupNodeAndInstall/action.yml @@ -71,6 +71,6 @@ runs: - name: Install custom or pnpm dependencies if: (inputs.package-manager != 'npm' || steps.install-command.outputs.value != 'npm ci') && (inputs.package-manager != 'yarn' || steps.install-command.outputs.value != 'yarn install --network-timeout 600000') - uses: salesforcecli/github-workflows/.github/actions/retry@ph/W-23832274-pnpm-stable-promotion + uses: salesforcecli/github-workflows/.github/actions/retry@main with: command: ${{ steps.install-command.outputs.value }} diff --git a/.github/actions/updateNodeLockfile/action.yml b/.github/actions/updateNodeLockfile/action.yml index f196e08..3e4ceca 100644 --- a/.github/actions/updateNodeLockfile/action.yml +++ b/.github/actions/updateNodeLockfile/action.yml @@ -55,6 +55,6 @@ runs: echo "value=$COMMAND" >> "$GITHUB_OUTPUT" - name: Refresh lockfile with retries - uses: salesforcecli/github-workflows/.github/actions/retry@ph/W-23832274-pnpm-stable-promotion + uses: salesforcecli/github-workflows/.github/actions/retry@main with: command: ${{ steps.command.outputs.value }} diff --git a/.github/actions/yarnInstallWithRetries/action.yml b/.github/actions/yarnInstallWithRetries/action.yml index 8781514..439f758 100644 --- a/.github/actions/yarnInstallWithRetries/action.yml +++ b/.github/actions/yarnInstallWithRetries/action.yml @@ -8,6 +8,6 @@ runs: using: composite steps: - name: yarn install - uses: salesforcecli/github-workflows/.github/actions/retry@ph/W-23832274-pnpm-stable-promotion + uses: salesforcecli/github-workflows/.github/actions/retry@main with: command: yarn install --network-timeout 600000 ${{ inputs.ignore-scripts == 'true' && '--ignore-scripts' || '' }} From a4b927aa25f7d3d19cf8728e9af70f5ee1df31f9 Mon Sep 17 00:00:00 2001 From: peternhale Date: Wed, 12 Aug 2026 15:32:39 -0600 Subject: [PATCH 4/5] fix: use IDE token for VS Code releases --- .github/workflows/vscode-publish-extensions.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/vscode-publish-extensions.yml b/.github/workflows/vscode-publish-extensions.yml index f5e24fa..d6f7d3d 100644 --- a/.github/workflows/vscode-publish-extensions.yml +++ b/.github/workflows/vscode-publish-extensions.yml @@ -545,7 +545,7 @@ jobs: - name: Validate GitHub authentication if: inputs.dry-run != 'true' && github.event.inputs.dry-run != 'true' env: - GH_TOKEN: ${{ secrets.IDEE_GH_TOKEN }} + GH_TOKEN: ${{ secrets.IDEE_GH_TOKEN || github.token }} run: | # Validate that required tokens are present if [ -z "$GH_TOKEN" ]; then @@ -565,8 +565,8 @@ jobs: # Manually push the missing tags: git push origin --tags - name: Commit version bumps with tags env: - # Ensure GitHub CLI has proper authentication - GITHUB_TOKEN: ${{ secrets.IDEE_GH_TOKEN }} + # Use the IDE token when configured; otherwise retain GitHub's workflow token. + GH_TOKEN: ${{ secrets.IDEE_GH_TOKEN || github.token }} DRY_RUN: ${{ inputs.dry-run || github.event.inputs.dry-run || 'false' }} GIT_USER_NAME: ${{ inputs.git-user-name }} GIT_USER_EMAIL: ${{ inputs.git-user-email }} @@ -599,8 +599,8 @@ jobs: export GIT_COMMITTER_NAME="$GIT_USER_NAME" export GIT_COMMITTER_EMAIL="$GIT_USER_EMAIL" - # Configure git to use the PAT for authentication - git remote set-url origin https://x-access-token:${{ secrets.IDEE_GH_TOKEN }}@github.com/${{ github.repository }}.git + # Configure git to use the effective workflow token for authentication. + git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git" # Add all changes # Note: git add . respects .gitignore, so ignored files won't be added @@ -964,7 +964,7 @@ jobs: - name: Create GitHub releases env: - GITHUB_TOKEN: ${{ secrets.IDEE_GH_TOKEN }} + GH_TOKEN: ${{ secrets.IDEE_GH_TOKEN || github.token }} GITHUB_REPOSITORY: ${{ github.repository }} SELECTED_EXTENSIONS: ${{ needs.determine-changes.outputs.selected-extensions }} IS_NIGHTLY: ${{ inputs.nightly && 'true' || 'false' }} @@ -1205,6 +1205,7 @@ jobs: if: inputs.dry-run != 'true' && github.event.inputs.dry-run != 'true' && needs.publish.result == 'success' uses: slackapi/slack-github-action@v3.0.3 with: + webhook-type: incoming-webhook payload: | { "text": "${{ inputs.slack-notification-title }}", @@ -1338,6 +1339,7 @@ jobs: if: inputs.dry-run != 'true' && github.event.inputs.dry-run != 'true' && (needs.publish.result == 'failure' || needs.bump-versions.result == 'failure' || needs.package.result == 'failure') uses: slackapi/slack-github-action@v3.0.3 with: + webhook-type: incoming-webhook payload: | { "text": "❌ VS Code Extension Release Failed!", From 43e42d4590f034f94f86eda4e43f895e8d9e3164 Mon Sep 17 00:00:00 2001 From: peternhale Date: Thu, 13 Aug 2026 05:37:04 -0600 Subject: [PATCH 5/5] fix: avoid npm cache for automerge --- .github/workflows/automerge.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 593f9b5..168b647 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -32,7 +32,6 @@ jobs: - uses: actions/setup-node@v4 with: node-version: lts/* - cache: npm - run: npm install -g @salesforce/plugin-release-management --omit=dev