@@ -84,107 +84,20 @@ jobs:
84
84
run : gh release upload ${{ inputs.version }} ${{ env.PACKAGE_FILE }} ${{ env.PACKAGE_FILE }}.sig
85
85
86
86
build-windows :
87
- name : " Create Windows package"
88
- # windows-latest is required to use enableCrossOsArchive with Ubuntu in the
89
- # next step. See https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cross-os-cache
90
- runs-on : windows-latest
91
- defaults :
92
- run :
93
- shell : cmd
94
-
95
- strategy :
96
- fail-fast : false
97
- matrix :
98
- # Note: keep this in sync with the Windows matrix in windows-tests.yml
99
- php : [ "7.4", "8.0", "8.1", "8.2", "8.3" ]
100
- arch : [ x64, x86 ]
101
- ts : [ ts, nts ]
102
-
103
- steps :
104
- - uses : actions/checkout@v4
105
- with :
106
- submodules : true
107
- ref : ${{ inputs.ref }}
108
-
109
- - name : " Build Driver"
110
- id : build-driver
111
- uses : ./.github/actions/windows/build
112
- with :
113
- version : ${{ matrix.php }}
114
- arch : ${{ matrix.arch }}
115
- ts : ${{ matrix.ts }}
116
-
117
- - name : " Copy DLL and PDB files to CWD"
118
- run : |
119
- cp %BUILD_DIR%\php_mongodb.dll .
120
- cp %BUILD_DIR%\php_mongodb.pdb .
121
- env :
122
- BUILD_DIR : ${{ steps.build-driver.outputs.build-dir }}
123
-
124
- - name : " Cache build artifacts for subsequent builds"
125
- uses : actions/cache/save@v4
126
- with :
127
- key : ${{ github.sha }}-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.arch }}
128
- enableCrossOsArchive : true
129
- path : |
130
- php_mongodb.dll
131
- php_mongodb.pdb
132
-
133
- sign-and-publish-windows :
134
- environment : release
135
- name : " Sign and Publish Windows package"
136
- needs : [build-windows]
137
- # ubuntu-latest is required to use enableCrossOsArchive
138
- # See https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cross-os-cache
139
- runs-on : " ubuntu-latest"
140
- permissions :
141
- id-token : write
142
-
87
+ name : " Create Windows packages"
88
+ uses : ./.github/workflows/build-windows-package.yml
89
+ with :
90
+ version : ${{ inputs.version }}
91
+ ref : refs/tags/${{ inputs.version }}
92
+ php : ${{ matrix.php }}
93
+ arch : ${{ matrix.arch }}
94
+ ts : ${{ matrix.ts }}
95
+ upload_release_asset : true
96
+ secrets : inherit
143
97
strategy :
144
98
fail-fast : false
145
99
matrix :
146
100
# Note: keep this in sync with the Windows matrix in windows-tests.yml
147
101
php : [ "7.4", "8.0", "8.1", "8.2", "8.3" ]
148
102
arch : [ x64, x86 ]
149
103
ts : [ ts, nts ]
150
-
151
- steps :
152
- - name : " Generate token and checkout repository"
153
- uses : mongodb-labs/drivers-github-tools/secure-checkout@v2
154
- with :
155
- app_id : ${{ vars.APP_ID }}
156
- private_key : ${{ secrets.APP_PRIVATE_KEY }}
157
- ref : ${{ inputs.ref }}
158
-
159
- - name : " Set up drivers-github-tools"
160
- uses : mongodb-labs/drivers-github-tools/setup@v2
161
- with :
162
- aws_role_arn : ${{ secrets.AWS_ROLE_ARN }}
163
- aws_region_name : ${{ vars.AWS_REGION_NAME }}
164
- aws_secret_id : ${{ secrets.AWS_SECRET_ID }}
165
-
166
- - name : Restore cached build artifacts
167
- id : cache-build-artifacts
168
- uses : actions/cache/restore@v4
169
- with :
170
- fail-on-cache-miss : true
171
- key : ${{ github.sha }}-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.arch }}
172
- enableCrossOsArchive : true
173
- path : |
174
- php_mongodb.dll
175
- php_mongodb.pdb
176
-
177
- - name : " Create detached DLL signature"
178
- uses : mongodb-labs/drivers-github-tools/gpg-sign@v2
179
- with :
180
- filenames : php_mongodb.dll
181
-
182
- # Copy the signature file from the release asset directory to avoid directory issues in the ZIP file
183
- - name : " Copy signature file"
184
- run : cp ${RELEASE_ASSETS}/php_mongodb.dll.sig .
185
-
186
- - name : " Create and upload release artifact"
187
- run : |
188
- ARCHIVE=php_mongodb-${{ inputs.version }}-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.arch }}.zip
189
- zip ${ARCHIVE} php_mongodb.dll php_mongodb.dll.sig php_mongodb.pdb CREDITS CONTRIBUTING.md LICENSE README.md THIRD_PARTY_NOTICES
190
- gh release upload ${{ inputs.version }} ${ARCHIVE}
0 commit comments