Skip to content

Commit 76076ae

Browse files
authored
[0.74] Fix publish pipeline (#15811)
* Fix publish pipeline * Change files
1 parent 82ae213 commit 76076ae

File tree

10 files changed

+79
-23
lines changed

10 files changed

+79
-23
lines changed

.ado/publish.yml

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,18 @@ parameters:
102102
BuildConfiguration: Release
103103
BuildPlatform: ARM64
104104
UseFabric: true
105+
- Name: X64DebugFabric
106+
BuildConfiguration: Debug
107+
BuildPlatform: x64
108+
UseFabric: true
109+
- Name: X86DebugFabric
110+
BuildConfiguration: Debug
111+
BuildPlatform: x86
112+
UseFabric: true
113+
- Name: Arm64DebugFabric
114+
BuildConfiguration: Debug
115+
BuildPlatform: ARM64
116+
UseFabric: true
105117

106118
variables:
107119
- template: variables/windows.yml
@@ -214,7 +226,7 @@ extends:
214226
- template: .ado/templates/msbuild-sln.yml@self
215227
parameters:
216228
solutionDir: vnext
217-
solutionName: ReactWindows-Desktop.Publish.slnf
229+
solutionName: ReactWindows-Desktop.sln
218230
buildPlatform: ${{ matrix.BuildPlatform }}
219231
buildConfiguration: ${{ matrix.BuildConfiguration }}
220232
oneESMode: true ## Files are only copied to staging, not published
@@ -230,13 +242,17 @@ extends:
230242
buildPlatform: ${{ matrix.BuildPlatform }}
231243
buildConfiguration: ${{ matrix.BuildConfiguration }}
232244
contents: |
233-
React.Windows.Desktop\Microsoft.ReactNative.winmd
234-
React.Windows.Desktop.DLL\react-native-win32.*
245+
React.Windows.Desktop\**
246+
React.Windows.Desktop.DLL\**
247+
React.Windows.Desktop.Test.DLL\**
235248
236249
- template: .ado/templates/esrp-codesign-binaries.yml@self
237250
parameters:
238251
displayName: 'CodeSign Desktop Binaries'
239-
folderPath: $(Build.StagingDirectory)/NuGet/Desktop/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }}
252+
${{ if eq(matrix.UseFabric, true) }}:
253+
folderPath: $(Build.StagingDirectory)/NuGet/DesktopFabric/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }}
254+
${{ else }}:
255+
folderPath: $(Build.StagingDirectory)/NuGet/Desktop/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }}
240256
pattern: |
241257
**/react-native-win32.dll
242258
@@ -318,14 +334,17 @@ extends:
318334
buildPlatform: ${{ matrix.BuildPlatform }}
319335
buildConfiguration: ${{ matrix.BuildConfiguration }}
320336
contents: |
321-
Microsoft.ReactNative\Microsoft.ReactNative.*
322-
Microsoft.ReactNative.CsWinRT\Microsoft.ReactNative.Projection.*
337+
Microsoft.ReactNative\**
338+
Microsoft.ReactNative.Managed\**
323339
Microsoft.ReactNative.Managed.CodeGen\**
324340
325341
- template: .ado/templates/esrp-codesign-binaries.yml@self
326342
parameters:
327343
displayName: 'CodeSign Microsoft.ReactNative Binaries'
328-
folderPath: $(Build.StagingDirectory)/NuGet/ReactWindows/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }}
344+
${{ if eq(matrix.UseFabric, true) }}:
345+
folderPath: $(Build.StagingDirectory)/NuGet/ReactWindowsFabric/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }}
346+
${{ else }}:
347+
folderPath: $(Build.StagingDirectory)/NuGet/ReactWindows/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }}
329348
pattern: |
330349
**/Microsoft.ReactNative.dll
331350
**/Microsoft.ReactNative.winmd
@@ -449,6 +468,26 @@ extends:
449468
- platform: ARM64EC
450469
configuration: Debug
451470

471+
- template: .ado/templates/prep-and-pack-nuget.yml@self
472+
parameters:
473+
artifactName: DesktopFabric
474+
publishCommitId: $(publishCommitId)
475+
npmVersion: $(npmVersion)-Fabric
476+
packDesktop: true
477+
slices:
478+
- platform: x64
479+
configuration: Release
480+
- platform: x86
481+
configuration: Release
482+
- platform: ARM64EC
483+
configuration: Release
484+
- platform: x64
485+
configuration: Debug
486+
- platform: x86
487+
configuration: Debug
488+
- platform: ARM64EC
489+
configuration: Debug
490+
452491
- template: .ado/templates/esrp-codesign-nuget.yml@self
453492
parameters:
454493
displayName: 'CodeSign all NuGet packages'

.ado/templates/prep-and-pack-nuget.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ parameters:
1414
# Note: NuGet pack expects platform-specific file separators ('\' on Windows).
1515
- name: nugetroot
1616
type: string
17-
default: $(System.DefaultWorkingDirectory)\ReactWindows
17+
default: $(System.DefaultWorkingDirectory)\NugetRoot
1818

1919
- name: packDesktop
2020
type: boolean
@@ -95,8 +95,6 @@ steps:
9595
nuspec: Microsoft.ReactNative
9696
slices: $(debugSlices)
9797
packageVersion: ${{parameters.npmVersion}}
98-
codesignBinaries: ${{ parameters.signMicrosoft }}
99-
codesignNuget: ${{ parameters.signMicrosoft }}
10098
buildProperties: CommitId=${{parameters.publishCommitId}};nugetroot=${{parameters.nugetroot}};baseconfiguration=Debug;baseplatform=$(debugBasePlatform)
10199
- ${{ if containsValue(parameters.slices.*.configuration, 'Release') }}:
102100
- template: prep-and-pack-single.yml
@@ -122,17 +120,13 @@ steps:
122120
nuspec: Microsoft.ReactNative.Managed
123121
slices: $(debugSlices)
124122
packageVersion: ${{parameters.npmVersion}}
125-
codesignBinaries: ${{ parameters.signMicrosoft }}
126-
codesignNuget: ${{ parameters.signMicrosoft }}
127123
buildProperties: CommitId=${{parameters.publishCommitId}};nugetroot=${{parameters.nugetroot}};baseconfiguration=Debug;baseplatform=$(debugBasePlatform)
128124
- ${{ if containsValue(parameters.slices.*.configuration, 'Release') }}:
129125
- template: prep-and-pack-single.yml
130126
parameters:
131127
outputPackage: Microsoft.ReactNative.Managed
132128
slices: $(releaseSlices)
133129
packageVersion: ${{parameters.npmVersion}}
134-
codesignBinaries: ${{ parameters.signMicrosoft }}
135-
codesignNuget: ${{ parameters.signMicrosoft }}
136130
buildProperties: CommitId=${{parameters.publishCommitId}};nugetroot=${{parameters.nugetroot}};baseconfiguration=Release;baseplatform=$(releaseBasePlatform)
137131

138132
- ${{ if eq(parameters.packMicrosoftReactNativeManagedCodeGen, true) }}:
@@ -141,5 +135,3 @@ steps:
141135
outputPackage: Microsoft.ReactNative.Managed.CodeGen
142136
packageVersion: ${{parameters.npmVersion}}
143137
buildProperties: CommitId=${{parameters.publishCommitId}};nugetroot=${{parameters.nugetroot}};baseconfiguration=$(baseConfiguration);baseplatform=$(basePlatform)
144-
codesignBinaries: ${{ parameters.signMicrosoft }}
145-
codesignNuget: ${{ parameters.signMicrosoft }}

.ado/templates/prep-and-pack-single.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ parameters:
2525

2626
steps:
2727

28+
- powershell: gci $(System.DefaultWorkingDirectory)/NugetRoot
29+
displayName: List files in NugetRoot
30+
2831
- ${{ if ne(parameters.slices, '') }}:
2932
- powershell: >
3033
.\StripAdditionalPlatformsFromNuspec.ps1
@@ -33,7 +36,7 @@ steps:
3336
-slices (ConvertFrom-Json '${{ parameters.slices }}')
3437
-debug
3538
displayName: '${{ parameters.outputPackage }} - Strip slices from nuspec'
36-
workingDirectory: $(System.DefaultWorkingDirectory)/ReactWindows
39+
workingDirectory: $(System.DefaultWorkingDirectory)/NugetRoot
3740
3841
# Binary signing is done in build jobs (ESRP CodeSign before artifact upload)
3942
# NuGet signing is done in batch in publish.yml (single ESRP call for all .nupkg)
@@ -44,7 +47,7 @@ steps:
4447
inputs:
4548
command: pack
4649
verbosityPack: 'Detailed'
47-
packagesToPack: $(System.DefaultWorkingDirectory)/ReactWindows/${{ parameters.outputPackage }}.nuspec
50+
packagesToPack: $(System.DefaultWorkingDirectory)/NugetRoot/${{ parameters.outputPackage }}.nuspec
4851
packDestination: $(System.DefaultWorkingDirectory)/NugetRootFinal
4952
buildProperties: version=${{ parameters.packageVersion }};id=${{ parameters.outputPackage }};${{ parameters.buildProperties }}
5053

.claude/settings.local.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(npx lage:*)",
5+
"Bash(yarn install:*)",
6+
"Read(//e/GitHub/microsoft/123/**)",
7+
"Bash(yarn why:*)",
8+
"Bash(find e:/GitHub/microsoft/123/node_modules -path *parse-path* -name package.json)",
9+
"Bash(find e:/GitHub/microsoft/123/node_modules -path *@types*parse-path*)",
10+
"Bash(find node_modules -path *@types*parse-path* -maxdepth 6)",
11+
"Bash(yarn build:*)",
12+
"Bash(npx tsc:*)"
13+
]
14+
}
15+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Fix publish pipeline",
4+
"packageName": "@react-native-windows/codegen",
5+
"email": "vmorozov@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

docs/managedCodeGen.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ When building the apps that are checked in to our repo for testing, we have to r
2727

2828
## Turning on/off
2929
Currently the feature is behind an MSBuild property `$(ReactNativeCodeGenEnabled)`.
30-
The default at the moment is false, it is only turned on for a single project for now which is the [SampleLibraryCS.csproj](https://github.com/microsoft/react-native-windows/blob/main/packages/sample-apps/windows/SampleLibraryCS/SampleLibraryCS.csproj) project, to prove it is stable. We will slowly enable it for all projects in the repo and then make it the default.
30+
The default at the moment is false, it is only turned on for a single project for now which is the [SampleLibraryCS.csproj](https://github.com/microsoft/react-native-windows/blob/0.74-stable/packages/sample-apps/windows/SampleLibraryCS/SampleLibraryCS.csproj) project, to prove it is stable. We will slowly enable it for all projects in the repo and then make it the default.
3131

3232
## MSBuild/NuGet Complications
3333
MSBuild and NuGet spent a long time fighting me in mixing a NetCoreApp3.1 executable and WinRT apps in the same solution and the same build. ProjectReferences cannot be used so I had to use the `<MSBuild>` task directly in the targets and it was tricky making it build from both the customer apps as well as our main build solution and unittest (Microsoft.ReactNative.sln). In the end there are a few hacks in place to make this work.

docs/monorepo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
react-native-windows is a monorepo with several [packages](https://github.com/microsoft/react-native-windows/tree/main/packages) and uses monorepo management tools to install, build, and publish. This page is all about what tools we use to manage this monorepo and some technical details, aimed at folks who are contributing to react-native-windows.
33

44
# Installation of npm dependencies
5-
react-native-windows uses [yarn workspaces](https://legacy.yarnpkg.com/en/docs/workspaces/) to install all react-native-windows npm dependencies. See "workspaces" prop inside [package.json](https://github.com/microsoft/react-native-windows/blob/main/package.json).
5+
react-native-windows uses [yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/) to install all react-native-windows npm dependencies. See "workspaces" prop inside [package.json](https://github.com/microsoft/react-native-windows/blob/main/package.json).
66

77
# Lage Build
88
react-native-windows uses [lage](https://microsoft.github.io/lage/) to build all the "non-native" parts of react-native-windows. See "scripts" prop inside [package.json](https://github.com/microsoft/react-native-windows/blob/main/package.json). Also see [laga.config.js](https://github.com/microsoft/react-native-windows/blob/main/lage.config.js).

docs/react-native-windows-init.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This has the following benefits:
2222
* We can now generate a cpp template that use both NuGet AND WinUI3.
2323

2424
### Research before setteling on Mustache
25-
There are several templating schemes we could have chosen. We had a quick discussion and chose [mustache](https://www.npmjs.com/package/mustache) as it is a well-adopted, lightweight library dedicated for templating.
25+
There are several templating schemes we could have chosen. We had a quick discussion and chose [mustache](https://github.com/janl/mustache.js) as it is a well-adopted, lightweight library dedicated for templating.
2626
Alternatives considered:
2727
* js template expression: This would have required all files to become js programs that needed to be imported and evaluated. Since a lot of files contain data format or code, we would have likely had quite a few ugly escaping cases.
2828
* T4: This would have required visual studio to be installed on the users machine and therefore only work on Windows. There were also some perf concerns and we would have to write and ship a standalone executable for the MSBuild tasks so we can call it from JavaScript.

packages/@react-native-windows/codegen/Document.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default TurboModuleRegistry.getEnforcing<Spec>('SampleTurboModule');
5656
Checkout the following example:
5757

5858
- Flow definition: [NativeDialogManagerWindows.js](https://github.com/microsoft/react-native-windows/blob/main/vnext/src-win/Libraries/NativeModules/specs/NativeDialogManagerWindows.js)
59-
- Generated spec file: [NativeDialogManagerWindowsSpec.g.h](https://github.com/microsoft/react-native-windows/blob/main/vnext/codegen/NativeDialogManagerWindowsSpec.g.h)
59+
- Generated spec file: [NativeDialogManagerWindowsSpec.g.h](https://github.com/microsoft/react-native-windows/blob/0.74-stable/vnext/codegen/NativeDialogManagerWindowsSpec.g.h)
6060
- Implementation: [AlertModule.h](https://github.com/microsoft/react-native-windows/blob/main/vnext/Microsoft.ReactNative/Modules/AlertModule.h)
6161

6262
A TurboModule implemetation starts with:

packages/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ After adding a scope directory, add the scope to the list of yarn workspaces in
4141
```
4242

4343
Publishing a scoped package requires that the **rnbot** NPM user is an owner of an **npm organization** with the
44-
same name as the scope. You can check whether an organization exists by viewing [npmjs.com/org/<scope>](https://www.npmjs.com/org/rnw-scripts).
44+
same name as the scope. You can check whether an organization exists by viewing `npmjs.com/org/<scope>`.
4545
See acoates for granting permissions to rnbot.

0 commit comments

Comments
 (0)