Lightweight coding agent that runs in your terminal
Rust
Retry npm release publishing and match macOS verification runners (#54641)
jifb3cc59afcf28
diff --git a/.github/workflows/rust-release-provisioned-macos.yml b/.github/workflows/rust-release-provisioned-macos.ymlindex 6d1b24591f..bbed090187 100644--- a/.github/workflows/rust-release-provisioned-macos.yml+++ b/.github/workflows/rust-release-provisioned-macos.yml@@ -117,7 +117,7 @@ jobs:verify:needs: sign- runs-on: macos-15-xlarge+ runs-on: ${{ matrix.runner }}timeout-minutes: 30environment:name: codesigning@@ -129,7 +129,11 @@ jobs:strategy:fail-fast: falsematrix:- target: [aarch64-apple-darwin, x86_64-apple-darwin]+ include:+ - target: aarch64-apple-darwin+ runner: macos-15-xlarge+ - target: x86_64-apple-darwin+ runner: macos-15-intelenv:TARGET: ${{ matrix.target }}PROVISIONED_MACOS: "true"diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.ymlindex 42011c6867..3fc99ac71b 100644--- a/.github/workflows/rust-release.yml+++ b/.github/workflows/rust-release.yml@@ -1919,6 +1919,9 @@ jobs:env:VERSION: ${{ needs.release.outputs.version }}NPM_TAG: ${{ needs.release.outputs.npm_tag }}+ NPM_CONFIG_LOGLEVEL: verbose+ NPM_CONFIG_LOGS_DIR: ${{ runner.temp }}/npm-publish-logs+ NPM_CONFIG_LOGS_MAX: "100"run: |set -euo pipefailprefix=""@@ -2010,25 +2013,42 @@ jobs:publish_cmd+=(--tag "${tag}")fi- echo "+ ${publish_cmd[*]}"- set +e- publish_output="$("${publish_cmd[@]}" 2>&1)"- publish_status=$?- set -e+ # A fresh npm process obtains new OIDC credentials on each attempt.+ for attempt in 1 2 3; do+ echo "+ ${publish_cmd[*]} (attempt ${attempt}/3)"+ set +e+ publish_output="$("${publish_cmd[@]}" 2>&1)"+ publish_status=$?+ set -e- echo "${publish_output}"- if [[ ${publish_status} -eq 0 ]]; then- continue- fi+ echo "${publish_output}"+ if [[ ${publish_status} -eq 0 ]]; then+ break+ fi- if grep -qiE "previously published|cannot publish over|version already exists" <<< "${publish_output}"; then- echo "Skipping already-published package version for ${filename}"- continue- fi+ if grep -qiE "previously published|cannot publish over|version already exists" <<< "${publish_output}"; then+ echo "Skipping already-published package version for ${filename}"+ break+ fi- exit "${publish_status}"+ if [[ ${attempt} -eq 3 ]]; then+ exit "${publish_status}"+ fi+ delay=$((attempt * 10))+ echo "Publishing ${filename} failed; retrying in ${delay} seconds."+ sleep "${delay}"+ donedone+ - name: Retain npm debug logs+ if: always()+ uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0+ with:+ name: npm-publish-logs-${{ github.run_attempt }}+ path: ${{ runner.temp }}/npm-publish-logs/+ if-no-files-found: ignore+ retention-days: 7+deploy-dev-website:name: Trigger developers.openai.com deployneeds: release