|
1 |
| -name: mingw-w64-x86_64-git |
| 1 | +name: git-artifacts |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | # This workflow can be triggered manually in the Actions tab, see
|
@@ -193,3 +193,76 @@ jobs:
|
193 | 193 | with:
|
194 | 194 | name: pkg-x86_64
|
195 | 195 | path: artifacts
|
| 196 | + installer-x86_64: |
| 197 | + runs-on: windows-latest |
| 198 | + needs: pkg-x86_64 |
| 199 | + env: |
| 200 | + MSYSTEM: MINGW64 |
| 201 | + steps: |
| 202 | + - name: Download pkg-x86_64 |
| 203 | + uses: actions/download-artifact@v1 |
| 204 | + with: |
| 205 | + name: pkg-x86_64 |
| 206 | + path: pkg-x86_64 |
| 207 | + - name: Download bundle-artifacts |
| 208 | + uses: actions/download-artifact@v1 |
| 209 | + with: |
| 210 | + name: bundle-artifacts |
| 211 | + path: bundle-artifacts |
| 212 | + - name: Download git-sdk-64-build-installers |
| 213 | + shell: bash |
| 214 | + run: | |
| 215 | + # Use Git Bash to download and unpack the artifact |
| 216 | +
|
| 217 | + ## Get artifact |
| 218 | + urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds |
| 219 | + id=${{ needs.pkg.outputs.latest-sdk64-extra-build-id }} |
| 220 | + download_url="$(curl "$urlbase/$id/artifacts" | |
| 221 | + jq -r '.value[] | select(.name == "git-sdk-64-build-installers").resource.downloadUrl')" |
| 222 | +
|
| 223 | + curl -o artifacts.zip "$download_url" |
| 224 | +
|
| 225 | + ## Unpack artifact |
| 226 | + unzip artifacts.zip |
| 227 | + - name: Clone and update build-extra |
| 228 | + shell: bash |
| 229 | + run: | |
| 230 | + d=git-sdk-64-build-installers/usr/src/build-extra && |
| 231 | + git clone --single-branch -b main https://github.com/git-for-windows/build-extra $d && |
| 232 | + git -C $d pull "$PWD"/bundle-artifacts/build-extra.bundle main |
| 233 | + - name: Prepare home directory for code-signing |
| 234 | + env: |
| 235 | + CODESIGN_P12: ${{secrets.CODESIGN_P12}} |
| 236 | + CODESIGN_PASS: ${{secrets.CODESIGN_PASS}} |
| 237 | + if: (matrix.artifact.name == 'installer' || matrix.artifact.name == 'portable') && env.CODESIGN_P12 != '' && env.CODESIGN_PASS != '' |
| 238 | + shell: bash |
| 239 | + run: | |
| 240 | + mkdir -p home/.sig && |
| 241 | + echo -n "$CODESIGN_P12" | tr % '\n' | base64 -d >home/.sig/codesign.p12 && |
| 242 | + echo -n "$CODESIGN_PASS" >home/.sig/codesign.pass && |
| 243 | + git config --global alias.signtool '!sh "/usr/src/build-extra/signtool.sh"' |
| 244 | + - name: Build 64-bit installer |
| 245 | + shell: powershell |
| 246 | + run: | |
| 247 | + & .\git-sdk-64-build-installers\usr\bin\bash.exe -lc @" |
| 248 | + set -x |
| 249 | + /usr/src/build-extra/please.sh make_installers_from_mingw_w64_git --version=`$(cat pkg-x86_64/ver) -o artifacts --installer --pkg=pkg-x86_64/mingw-w64-x86_64-git-[0-9]*.tar.xz --pkg=pkg-x86_64/mingw-w64-x86_64-git-doc-html-[0-9]*.tar.xz && |
| 250 | + openssl dgst -sha256 artifacts/Git-*.exe | sed \"s/.* //\" >artifacts/sha-256.txt && |
| 251 | + cp /usr/src/build-extra/installer/package-versions.txt artifacts/ && |
| 252 | +
|
| 253 | + a=`$PWD/artifacts && |
| 254 | + p=`$PWD/pkg-x86_64 && |
| 255 | + (cd /usr/src/build-extra && |
| 256 | + mkdir -p cached-source-packages && |
| 257 | + cp \"`$p\"/*-pdb* cached-source-packages/ && |
| 258 | + GIT_CONFIG_PARAMETERS=\"'windows.sdk64.path='\" ./please.sh bundle_pdbs --arch=x86_64 --directory=\"`$a\" installer/package-versions.txt) |
| 259 | + "@ |
| 260 | + - name: Clean up temporary files |
| 261 | + if: always() |
| 262 | + shell: bash |
| 263 | + run: rm -rf home |
| 264 | + - name: Publish installer-x86_64 |
| 265 | + uses: actions/upload-artifact@v1 |
| 266 | + with: |
| 267 | + name: installer-x86_64 |
| 268 | + path: artifacts |
0 commit comments