Fix post-release workflow failures (#57627)

Summary:
Fixes the three post-release failures from the [0.87.0-rc.2 publish run](https://github.com/react/react-native/actions/runs/29775529785/):

- Keep Flow annotations in `verifyArtifactsAreOnMaven.js` as comments so `actions/github-script` can load the file with plain Node.
- Pin the Podfile lock workflow to `macos-15`, which provides the configured Xcode 16.4 version.
- Use the canonical `react/react-native` owner for release asset API operations so upload POST requests are not redirected from the former owner.

## Changelog:

[INTERNAL] [FIXED] - Fix post-release Maven verification, Podfile lock, and release asset jobs

Pull Request resolved: https://github.com/react/react-native/pull/57627

Test Plan:
```sh
node --check .github/workflow-scripts/verifyArtifactsAreOnMaven.js
node --check scripts/releases/upload-release-assets-for-dotslash.js
yarn jest .github/workflow-scripts/__tests__/verifyArtifactsAreOnMaven-test.js scripts/releases/__tests__/upload-release-assets-for-dotslash-test.js --runInBand
```

13 tests and 15 snapshots pass.

Reviewed By: zeyap

Differential Revision: D113032768

Pulled By: cipolleschi

fbshipit-source-id: df5f493603e6c25157fd7660b54aa409dcb742e7
This commit is contained in:
Riccardo Cipolleschi authored and meta-codesync[bot] committed 2026-07-21 09:31:58 -07:00
1 parent 527698f2e5
commit 60fac2e14d
4 files changed
+18 -14

No files matched your search

@@ -28,7 +28,7 @@ Array [
Array [
Object {
"asset_id": "1",
"owner": "facebook",
"owner": "react",
"repo": "react-native",
},
],
@@ -47,7 +47,7 @@ Array [
"content-type": "text/plain",
},
"name": "test.tar.gz",
"owner": "facebook",
"owner": "react",
"release_id": "1",
"repo": "react-native",
},
@@ -114,7 +114,7 @@ Array [
"content-type": "text/plain",
},
"name": "test.tar.gz",
"owner": "facebook",
"owner": "react",
"release_id": "1",
"repo": "react-native",
},
@@ -194,7 +194,7 @@ Array [
"content-type": "text/plain",
},
"name": "test.tar.gz",
"owner": "facebook",
"owner": "react",
"release_id": "1",
"repo": "react-native",
},
@@ -25,6 +25,10 @@ const path = require('node:path');
const {parseArgs} = require('node:util');
const nullthrows = require('nullthrows');
// Upload POSTs are not preserved when GitHub redirects from the former owner.
const GITHUB_OWNER = 'react';
const GITHUB_REPO = 'react-native';
/*::
import type {DotSlashProvider, DotSlashHttpProvider, DotSlashArtifactInfo} from './utils/dotslash-utils';
import type {IOctokit} from './utils/octokit-utils';
@@ -138,8 +142,8 @@ async function getReleaseAssetMap(
octokit /*: IOctokit */,
) /*: Promise<ReleaseAssetMap> */ {
const existingAssets = await octokit.repos.listReleaseAssets({
owner: 'facebook',
repo: 'react-native',
owner: GITHUB_OWNER,
repo: GITHUB_REPO,
release_id: releaseId,
});
return new Map(existingAssets.data.map(asset => [asset.name, asset]));
@@ -305,8 +309,8 @@ async function maybeDeleteExistingReleaseAsset(
}
console.log(`[${name}] Deleting existing release asset...`);
await octokit.repos.deleteReleaseAsset({
owner: 'facebook',
repo: 'react-native',
owner: GITHUB_OWNER,
repo: GITHUB_REPO,
asset_id: existingAsset.id,
});
}
@@ -360,8 +364,8 @@ async function uploadAndVerifyReleaseAsset(
const {
data: {browser_download_url},
} = await octokit.repos.uploadReleaseAsset({
owner: 'facebook',
repo: 'react-native',
owner: GITHUB_OWNER,
repo: GITHUB_REPO,
release_id: releaseId,
name,
data,