@@ -39,42 +39,13 @@ jobs:
39
39
git config --global user.name "$USER_NAME" &&
40
40
git config --global user.email "$USER_EMAIL" &&
41
41
echo "PACKAGER=$USER_NAME <$USER_EMAIL>" >>$GITHUB_ENV
42
- - name : Determine latest git-sdk-64-extra-artifacts build ID
43
- id : determine-latest-sdk64-extra-build-id
44
- shell : bash
45
- run : |
46
- urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds
47
- id=$(curl "$urlbase?definitions=29&statusFilter=completed&resultFilter=succeeded&\$top=1" |
48
- jq -r '.value[0].id')
49
-
50
- echo "Latest ID is ${id}"
51
- echo "::set-output name=id::$id"
52
- - name : Cache git-sdk-64-build-installers
53
- id : cache-sdk-build-installers
54
- uses : actions/cache@v2
42
+ - uses : git-for-windows/setup-git-for-windows-sdk@v0
55
43
with :
56
- path : git-sdk-64-build-installers
57
- key : build-installers-64-${{ steps.determine-latest-sdk64-extra-build-id.outputs.id }}
58
- - name : Download git-sdk-64-build-installers
59
- if : steps.cache-sdk-build-installers.outputs.cache-hit != 'true'
60
- shell : bash
61
- run : |
62
- # Use Git Bash to download and unpack the artifact
63
-
64
- ## Get artifact
65
- urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds
66
- id=${{ steps.determine-latest-sdk64-extra-build-id.outputs.id }}
67
- download_url=$(curl "$urlbase/$id/artifacts" |
68
- jq -r '.value[] | select(.name == "git-sdk-64-build-installers").resource.downloadUrl')
69
-
70
- curl -o artifacts.zip "$download_url"
71
-
72
- ## Unpack artifact
73
- unzip artifacts.zip
44
+ flavor : build-installers
74
45
- name : Clone build-extra
75
46
shell : bash
76
47
run : |
77
- d=git-sdk-64-build-installers /usr/src/build-extra &&
48
+ d=/usr/src/build-extra &&
78
49
if test ! -d $d/.git
79
50
then
80
51
git clone --single-branch -b main https://github.com/git-for-windows/build-extra $d
88
59
run : |
89
60
echo '${{secrets.PRIVGPGKEY}}' | tr % '\n' | gpg $GPG_OPTIONS --import &&
90
61
mkdir -p home &&
91
- git config --global gpg.program "$PWD/git-sdk-64-build-installers /usr/src/build-extra/gnupg-with-gpgkey.sh" &&
62
+ git config --global gpg.program "/usr/src/build-extra/gnupg-with-gpgkey.sh" &&
92
63
info="$(gpg --list-keys --with-colons "${GPGKEY%% *}" | cut -d : -f 1,10 | sed -n '/^uid/{s|uid:||p;q}')" &&
93
64
git config --global user.name "${info% <*}" &&
94
65
git config --global user.email "<${info#*<}"
@@ -97,28 +68,26 @@ jobs:
97
68
- name : Generate bundle artifacts
98
69
env :
99
70
GPGKEY : ${{secrets.GPGKEY}}
100
- shell : powershell
71
+ shell : bash
101
72
run : |
102
- & .\git-sdk-64-build-installers\git-cmd.exe --command=usr\bin\bash.exe -lc @"
103
- printf '#!/bin/sh\n\nexec /mingw64/bin/git.exe "`$@"\n' >/usr/bin/git &&
104
- mkdir -p bundle-artifacts &&
73
+ printf '#!/bin/sh\n\nexec /mingw64/bin/git.exe "$@"\n' >/usr/bin/git &&
74
+ mkdir -p bundle-artifacts &&
105
75
106
- { test -n \"` $REPOSITORY\ " || REPOSITORY='${{github.repository}}'; } &&
107
- { test -n \"` $REF\ " || REF='${{github.ref}}'; } &&
108
- git -c init.defaultBranch=main init --bare &&
109
- git remote add -f origin https://github.com/git-for-windows/git &&
110
- git fetch \ "https://github.com/` $REPOSITORY\" \"` $REF:` $REF\ " &&
76
+ { test -n " $REPOSITORY" || REPOSITORY='${{github.repository}}'; } &&
77
+ { test -n " $REF" || REF='${{github.ref}}'; } &&
78
+ git -c init.defaultBranch=main init --bare &&
79
+ git remote add -f origin https://github.com/git-for-windows/git &&
80
+ git fetch "https://github.com/$REPOSITORY" " $REF:$REF" &&
111
81
112
- tag_name=\"` $(git describe --match 'v[0-9]*' FETCH_HEAD)-` $(date +%Y%m%d%H%M%S)\ " &&
113
- echo \ "prerelease-` ${tag_name#v}\ " >bundle-artifacts/ver &&
114
- echo \"` ${tag_name#v}\ " >bundle-artifacts/display_version &&
115
- echo \"` $tag_name\ " >bundle-artifacts/next_version &&
116
- git tag ` $(test -z \"` $GPGKEY\ " || echo \ " -s\ ") -m \ "Snapshot build\" \"` $tag_name\ " FETCH_HEAD &&
117
- git bundle create bundle-artifacts/git.bundle origin/main..\"` $tag_name\ " &&
82
+ tag_name=" $(git describe --match 'v[0-9]*' FETCH_HEAD)-$(date +%Y%m%d%H%M%S)" &&
83
+ echo "prerelease-${tag_name#v}" >bundle-artifacts/ver &&
84
+ echo " ${tag_name#v}" >bundle-artifacts/display_version &&
85
+ echo " $tag_name" >bundle-artifacts/next_version &&
86
+ git tag $(test -z " $GPGKEY" || echo " -s") -m "Snapshot build" " $tag_name" FETCH_HEAD &&
87
+ git bundle create bundle-artifacts/git.bundle origin/main.." $tag_name" &&
118
88
119
- sh -x /usr/src/build-extra/please.sh mention feature \"Snapshot of `$(git show -s --pretty='tformat:%h (%s, %ad)' --date=short FETCH_HEAD)\" &&
120
- git -C /usr/src/build-extra bundle create \"`$PWD/bundle-artifacts/build-extra.bundle\" origin/main..main
121
- "@
89
+ sh -x /usr/src/build-extra/please.sh mention feature "Snapshot of $(git show -s --pretty='tformat:%h (%s, %ad)' --date=short FETCH_HEAD)" &&
90
+ git -C /usr/src/build-extra bundle create "$PWD/bundle-artifacts/build-extra.bundle" origin/main..main
122
91
- name : Clean up temporary files
123
92
if : always()
124
93
shell : bash
@@ -166,29 +135,10 @@ jobs:
166
135
git config --global user.name "$USER_NAME" &&
167
136
git config --global user.email "$USER_EMAIL" &&
168
137
echo "PACKAGER=$USER_NAME <$USER_EMAIL>" >>$GITHUB_ENV
169
- - name : Cache git-sdk-64-build-installers
138
+ - uses : git-for-windows/setup-git-for-windows-sdk@v0
170
139
if : env.SKIP != 'true'
171
- id : cache-sdk-build-installers
172
- uses : actions/cache@v2
173
140
with :
174
- path : git-sdk-64-build-installers
175
- key : build-installers-64-${{ needs.bundle-artifacts.outputs.latest-sdk64-extra-build-id }}
176
- - name : Download git-sdk-64-build-installers
177
- if : env.SKIP != 'true' && steps.cache-sdk-build-installers.outputs.cache-hit != 'true'
178
- shell : bash
179
- run : |
180
- # Use Git Bash to download and unpack the artifact
181
-
182
- ## Get artifact
183
- urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds
184
- id=${{ needs.pkg.outputs.latest-sdk64-extra-build-id }}
185
- download_url=$(curl "$urlbase/$id/artifacts" |
186
- jq -r '.value[] | select(.name == "git-sdk-64-build-installers").resource.downloadUrl')
187
-
188
- curl -o artifacts.zip "$download_url"
189
-
190
- ## Unpack artifact
191
- unzip artifacts.zip
141
+ flavor : build-installers
192
142
- name : Download bundle-artifacts
193
143
if : env.SKIP != 'true'
194
144
uses : actions/download-artifact@v1
@@ -199,7 +149,7 @@ jobs:
199
149
if : env.SKIP != 'true'
200
150
shell : bash
201
151
run : |
202
- d=git-sdk-64-build-installers /usr/src/build-extra &&
152
+ d=/usr/src/build-extra &&
203
153
if test ! -d $d/.git
204
154
then
205
155
git clone --single-branch -b main https://github.com/git-for-windows/build-extra $d
@@ -242,32 +192,33 @@ jobs:
242
192
if : env.SKIP != 'true'
243
193
env :
244
194
GPGKEY : " ${{secrets.GPGKEY}}"
245
- shell : powershell
195
+ shell : bash
246
196
run : |
247
- & git-sdk-64-build-installers\usr\bin\sh.exe -lc @"
248
- set -x
197
+ set -x
249
198
250
- # Restrict `PATH` to MSYS2 and to Visual Studio (to let `cv2pdb` find the relevant DLLs)
251
- PATH=\"` /mingw64/bin:/usr/bin:/C/Program Files (x86)/Microsoft Visual Studio 14.0/VC/ bin${{matrix.arch.bin}}:/C/Windows/system32\"
199
+ # Make sure that there is a `/usr/bin/git` that can be used by `makepkg-mingw`
200
+ printf '#!/bin/sh\n\nexec /mingw64/bin/git.exe "$@"\n' >/usr/ bin/git &&
252
201
253
- type -p mspdb140.dll || exit 1
254
- sh -x /usr/src/build-extra/please.sh build-mingw-w64-git --only-${{matrix.arch.bitness}}-bit --build-src-pkg -o artifacts HEAD &&
255
- cp bundle-artifacts/ver artifacts/ &&
256
- if test -n \"`$GPGKEY\"
257
- then
258
- for tar in artifacts/*.tar*
259
- do
260
- /usr/src/build-extra/gnupg-with-gpgkey.sh --detach-sign --no-armor `$tar
261
- done
262
- fi &&
202
+ # Restrict `PATH` to MSYS2 and to Visual Studio (to let `cv2pdb` find the relevant DLLs)
203
+ PATH="/mingw64/bin:/usr/bin:/C/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin${{matrix.arch.bin}}:/C/Windows/system32"
263
204
264
- b=`$PWD/artifacts &&
265
- version=`$(cat bundle-artifacts/next_version) &&
266
- (cd /usr/src/MINGW-packages/mingw-w64-git &&
267
- cp PKGBUILD.`$version PKGBUILD &&
268
- git commit -s -m \"mingw-w64-git: new version (`$version)\" PKGBUILD &&
269
- git bundle create \"`$b\"/MINGW-packages.bundle origin/main..main)
270
- "@
205
+ type -p mspdb140.dll || exit 1
206
+ sh -x /usr/src/build-extra/please.sh build-mingw-w64-git --only-${{matrix.arch.bitness}}-bit --build-src-pkg -o artifacts HEAD &&
207
+ cp bundle-artifacts/ver artifacts/ &&
208
+ if test -n "$GPGKEY"
209
+ then
210
+ for tar in artifacts/*.tar*
211
+ do
212
+ /usr/src/build-extra/gnupg-with-gpgkey.sh --detach-sign --no-armor $tar
213
+ done
214
+ fi &&
215
+
216
+ b=$PWD/artifacts &&
217
+ version=$(cat bundle-artifacts/next_version) &&
218
+ (cd /usr/src/MINGW-packages/mingw-w64-git &&
219
+ cp PKGBUILD.$version PKGBUILD &&
220
+ git commit -s -m "mingw-w64-git: new version ($version)" PKGBUILD &&
221
+ git bundle create "$b"/MINGW-packages.bundle origin/main..main)
271
222
- name : Clean up temporary files
272
223
if : always() && env.SKIP != 'true'
273
224
shell : bash
@@ -421,63 +372,15 @@ jobs:
421
372
with :
422
373
name : bundle-artifacts
423
374
path : bundle-artifacts
424
- - name : Cache git-sdk-64-build-installers
375
+ - uses : git-for-windows/setup-git-for-windows-sdk@v0
425
376
if : env.SKIP != 'true' && matrix.arch.bitness == '64'
426
- id : cache-sdk64-build-installers
427
- uses : actions/cache@v2
428
377
with :
429
- path : git-sdk-64-build-installers
430
- key : build-installers-64-${{ needs.pkg.outputs.latest-sdk64-extra-build-id }}
431
- - name : Download git-sdk-64-build-installers
432
- if : env.SKIP != 'true' && matrix.arch.bitness == '64' && steps.cache-sdk64-build-installers.outputs.cache-hit != 'true'
433
- shell : bash
434
- run : |
435
- # Use Git Bash to download and unpack the artifact
436
-
437
- ## Get artifact
438
- urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds
439
- id=${{ needs.pkg.outputs.latest-sdk64-extra-build-id }}
440
- download_url="$(curl "$urlbase/$id/artifacts" |
441
- jq -r '.value[] | select(.name == "git-sdk-64-build-installers").resource.downloadUrl')"
442
-
443
- curl -o artifacts.zip "$download_url"
444
-
445
- ## Unpack artifact
446
- unzip artifacts.zip
447
- - name : Determine latest git-sdk-32-extra-artifacts build ID
378
+ flavor : build-installers
379
+ - uses : git-for-windows/setup-git-for-windows-sdk@v0
448
380
if : env.SKIP != 'true' && matrix.arch.bitness == '32'
449
- id : determine-latest-sdk32-extra-build-id
450
- shell : bash
451
- run : |
452
- urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds
453
- id=$(curl "$urlbase?definitions=30&statusFilter=completed&resultFilter=succeeded&\$top=1" |
454
- jq -r '.value[0].id')
455
-
456
- echo "Latest ID is ${id}"
457
- echo "::set-output name=id::$id"
458
- - name : Cache git-sdk-32-build-installers
459
- if : env.SKIP != 'true' && matrix.arch.bitness == '32'
460
- id : cache-sdk32-build-installers
461
- uses : actions/cache@v2
462
381
with :
463
- path : git-sdk-32-build-installers
464
- key : build-installers-32-${{ steps.determine-latest-sdk32-extra-build-id.outputs.id }}
465
- - name : Download git-sdk-32-build-installers
466
- if : env.SKIP != 'true' && matrix.arch.bitness == '32' && steps.cache-sdk32-build-installers.outputs.cache-hit != 'true'
467
- shell : bash
468
- run : |
469
- # Use Git Bash to download and unpack the artifact
470
-
471
- ## Get artifact
472
- urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds
473
- id=${{ steps.determine-latest-sdk32-extra-build-id.outputs.id }}
474
- download_url=$(curl "$urlbase/$id/artifacts" |
475
- jq -r '.value[] | select(.name == "git-sdk-32-build-installers").resource.downloadUrl')
476
-
477
- curl -o artifacts.zip "$download_url"
478
-
479
- ## Unpack artifact
480
- unzip artifacts.zip
382
+ flavor : build-installers
383
+ architecture : i686
481
384
- name : Download arm64 artifact
482
385
if : env.SKIP != 'true' && matrix.arch.arm64 == true
483
386
uses : actions/download-artifact@v1
@@ -488,7 +391,7 @@ jobs:
488
391
if : env.SKIP != 'true'
489
392
shell : bash
490
393
run : |
491
- d=git-sdk-${{matrix.arch.bitness}}-build-installers /usr/src/build-extra &&
394
+ d=/usr/src/build-extra &&
492
395
if test ! -d $d/.git
493
396
then
494
397
git clone --single-branch -b main https://github.com/git-for-windows/build-extra $d
@@ -510,38 +413,34 @@ jobs:
510
413
git config --global alias.signtool '!sh "/usr/src/build-extra/signtool.sh"'
511
414
- name : Build ${{matrix.arch.bitness}}-bit ${{matrix.artifact.name}}
512
415
if : env.SKIP != 'true'
513
- shell : powershell
416
+ shell : bash
514
417
run : |
515
- & .\git-sdk-${{matrix.arch.bitness}}-build-installers\usr\bin\bash.exe -lc @"
516
- set -x
517
- if test "${{matrix.arch.arm64}}" = true
518
- then
519
- ARM64="--include-arm64-artifacts=\"$PWD/arm64\""
520
- else
521
- ARM64=
522
- fi
418
+ set -x
419
+ if test "${{matrix.arch.arm64}}" = true
420
+ then
421
+ ARM64="--include-arm64-artifacts=\"$PWD/arm64\""
422
+ else
423
+ ARM64=
424
+ fi
523
425
524
- eval /usr/src/build-extra/please.sh make_installers_from_mingw_w64_git `$ARM64 --version=`$(cat pkg-${{matrix.arch.name}}/ver) -o artifacts --${{matrix.artifact.name}} --pkg=pkg-${{matrix.arch.name}}/mingw-w64-${{matrix.arch.name}}-git-[0-9]*.tar.xz --pkg=pkg-${{matrix.arch.name}}/mingw-w64-${{matrix.arch.name}}-git-doc-html-[0-9]*.tar.xz &&
525
- if test portable = '${{matrix.artifact.name}}' && test -n \"`$(git config alias.signtool)\"
526
- then
527
- git signtool artifacts/PortableGit-*.exe
528
- fi &&
529
- openssl dgst -sha256 artifacts/${{matrix.artifact.fileprefix}}-*.${{matrix.artifact.fileextension}} | sed \"s/.* //\" >artifacts/sha-256.txt
530
- "@
426
+ eval /usr/src/build-extra/please.sh make_installers_from_mingw_w64_git $ARM64 --version=$(cat pkg-${{matrix.arch.name}}/ver) -o artifacts --${{matrix.artifact.name}} --pkg=pkg-${{matrix.arch.name}}/mingw-w64-${{matrix.arch.name}}-git-[0-9]*.tar.xz --pkg=pkg-${{matrix.arch.name}}/mingw-w64-${{matrix.arch.name}}-git-doc-html-[0-9]*.tar.xz &&
427
+ if test portable = '${{matrix.artifact.name}}' && test -n "$(git config alias.signtool)"
428
+ then
429
+ git signtool artifacts/PortableGit-*.exe
430
+ fi &&
431
+ openssl dgst -sha256 artifacts/${{matrix.artifact.fileprefix}}-*.${{matrix.artifact.fileextension}} | sed "s/.* //" >artifacts/sha-256.txt
531
432
- name : Copy package-versions and pdbs
532
433
if : env.SKIP != 'true' && matrix.artifact.name == 'installer'
533
- shell : powershell
434
+ shell : bash
534
435
run : |
535
- & .\git-sdk-${{matrix.arch.bitness}}-build-installers\usr\bin\bash.exe -lc @"
536
- cp /usr/src/build-extra/installer/package-versions.txt artifacts/ &&
436
+ cp /usr/src/build-extra/installer/package-versions.txt artifacts/ &&
537
437
538
- a=`$PWD/artifacts &&
539
- p=`$PWD/pkg-${{matrix.arch.name}} &&
540
- (cd /usr/src/build-extra &&
541
- mkdir -p cached-source-packages &&
542
- cp \"`$p\"/*-pdb* cached-source-packages/ &&
543
- GIT_CONFIG_PARAMETERS=\"'windows.sdk${{matrix.arch.bitness}}.path='\" ./please.sh bundle_pdbs --arch=${{matrix.arch.name}} --directory=\"`$a\" installer/package-versions.txt)
544
- "@
438
+ a=$PWD/artifacts &&
439
+ p=$PWD/pkg-${{matrix.arch.name}} &&
440
+ (cd /usr/src/build-extra &&
441
+ mkdir -p cached-source-packages &&
442
+ cp "$p"/*-pdb* cached-source-packages/ &&
443
+ GIT_CONFIG_PARAMETERS="'windows.sdk${{matrix.arch.bitness}}.path='" ./please.sh bundle_pdbs --arch=${{matrix.arch.name}} --directory="$a" installer/package-versions.txt)
545
444
- name : Clean up temporary files
546
445
if : always() && env.SKIP != 'true'
547
446
shell : bash
@@ -582,34 +481,15 @@ jobs:
582
481
with :
583
482
name : bundle-artifacts
584
483
path : bundle-artifacts
585
- - name : Cache git-sdk-64-build-installers
484
+ - uses : git-for-windows/setup-git-for-windows-sdk@v0
586
485
if : env.SKIP != 'true'
587
- id : cache-sdk-build-installers
588
- uses : actions/cache@v2
589
486
with :
590
- path : git-sdk-64-build-installers
591
- key : build-installers-64-${{ needs.pkg.outputs.latest-sdk64-extra-build-id }}
592
- - name : Download git-sdk-64-build-installers
593
- if : env.SKIP != 'true' && steps.cache-sdk-build-installers.outputs.cache-hit != 'true'
594
- shell : bash
595
- run : |
596
- # Use Git Bash to download and unpack the artifact
597
-
598
- ## Get artifact
599
- urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds
600
- id=${{ needs.pkg.outputs.latest-sdk64-extra-build-id }}
601
- download_url=$(curl "$urlbase/$id/artifacts" |
602
- jq -r '.value[] | select(.name == "git-sdk-64-build-installers").resource.downloadUrl')
603
-
604
- curl -o artifacts.zip "$download_url"
605
-
606
- ## Unpack artifact
607
- unzip artifacts.zip
487
+ flavor : build-installers
608
488
- name : Clone and update build-extra
609
489
if : env.SKIP != 'true'
610
490
shell : bash
611
491
run : |
612
- d=git-sdk-64-build-installers /usr/src/build-extra &&
492
+ d=/usr/src/build-extra &&
613
493
if test ! -d $d/.git
614
494
then
615
495
git clone --single-branch -b main https://github.com/git-for-windows/build-extra $d
@@ -622,13 +502,11 @@ jobs:
622
502
if : env.SKIP != 'true'
623
503
- name : Build 64-bit NuGet packages
624
504
if : env.SKIP != 'true'
625
- shell : powershell
505
+ shell : bash
626
506
run : |
627
- & .\git-sdk-64-build-installers\usr\bin\bash.exe -lc @"
628
- /usr/src/build-extra/please.sh make_installers_from_mingw_w64_git --version=`$(cat pkg-x86_64/ver) -o artifacts --nuget --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 &&
629
- /usr/src/build-extra/please.sh make_installers_from_mingw_w64_git --version=`$(cat pkg-x86_64/ver) -o artifacts --nuget-mingit &&
630
- openssl dgst -sha256 artifacts/Git*.nupkg | sed \"s/.* //\" >artifacts/sha-256.txt
631
- "@
507
+ /usr/src/build-extra/please.sh make_installers_from_mingw_w64_git --version=$(cat pkg-x86_64/ver) -o artifacts --nuget --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 &&
508
+ /usr/src/build-extra/please.sh make_installers_from_mingw_w64_git --version=$(cat pkg-x86_64/ver) -o artifacts --nuget-mingit &&
509
+ openssl dgst -sha256 artifacts/Git*.nupkg | sed "s/.* //" >artifacts/sha-256.txt
632
510
- name : Publish nuget-x86_64
633
511
if : env.SKIP != 'true'
634
512
uses : actions/upload-artifact@v1
0 commit comments