@@ -473,3 +473,99 @@ jobs:
473
473
git/.github/macos-installer/*.dmg
474
474
git/.github/macos-installer/*.pkg
475
475
# End build and sign Mac OSX installers
476
+
477
+ # Build unsigned Ubuntu package
478
+ create-linux-unsigned-artifacts :
479
+ runs-on : ubuntu-latest
480
+ container :
481
+ image : ubuntu:16.04 # expanded security maintenance until 04/02/2026, according to https://endoflife.date/ubuntu
482
+ volumes :
483
+ # override /__e/node20 because GitHub Actions uses a version that requires too-recent glibc, see "Install dependencies" below
484
+ - /tmp:/__e/node20
485
+ needs : prereqs
486
+ steps :
487
+ - name : Install dependencies
488
+ run : |
489
+ set -ex
490
+ apt-get update -q
491
+ apt-get install -y -q --no-install-recommends \
492
+ build-essential \
493
+ tcl tk gettext asciidoc xmlto \
494
+ libcurl4-gnutls-dev libpcre2-dev zlib1g-dev libexpat-dev \
495
+ curl ca-certificates
496
+
497
+ # Install a Node.js version that works in older Ubuntu containers (read: does not require very recent glibc)
498
+ NODE_VERSION=v20.18.1 &&
499
+ NODE_URL=https://unofficial-builds.nodejs.org/download/release/$NODE_VERSION/node-$NODE_VERSION-linux-x64-glibc-217.tar.gz &&
500
+ curl -Lo /tmp/node.tar.gz $NODE_URL &&
501
+ tar -C /__e/node20 -x --strip-components=1 -f /tmp/node.tar.gz
502
+
503
+ - name : Clone git
504
+ uses : actions/checkout@v4
505
+ with :
506
+ path : git
507
+
508
+ - name : Build and create Debian package
509
+ run : |
510
+ set -ex
511
+
512
+ die () {
513
+ echo "$*" >&2
514
+ exit 1
515
+ }
516
+
517
+ echo "${{ needs.prereqs.outputs.tag_version }}" >>git/version
518
+ make -C git GIT-VERSION-FILE
519
+
520
+ VERSION="${{ needs.prereqs.outputs.tag_version }}"
521
+
522
+ ARCH="$(dpkg-architecture -q DEB_HOST_ARCH)"
523
+ if test -z "$ARCH"; then
524
+ die "Could not determine host architecture!"
525
+ fi
526
+
527
+ PKGNAME="microsoft-git_$VERSION"
528
+ PKGDIR="$(dirname $(pwd))/$PKGNAME"
529
+
530
+ rm -rf "$PKGDIR"
531
+ mkdir -p "$PKGDIR"
532
+
533
+ DESTDIR="$PKGDIR" make -C git -j5 V=1 DEVELOPER=1 \
534
+ USE_LIBPCRE=1 \
535
+ USE_CURL_FOR_IMAP_SEND=1 NO_OPENSSL=1 \
536
+ NO_CROSS_DIRECTORY_HARDLINKS=1 \
537
+ ASCIIDOC8=1 ASCIIDOC_NO_ROFF=1 \
538
+ ASCIIDOC='TZ=UTC asciidoc' \
539
+ prefix=/usr/local \
540
+ gitexecdir=/usr/local/lib/git-core \
541
+ libexecdir=/usr/local/lib/git-core \
542
+ htmldir=/usr/local/share/doc/git/html \
543
+ install install-doc install-html
544
+
545
+ cd ..
546
+ mkdir "$PKGNAME/DEBIAN"
547
+
548
+ # Based on https://packages.ubuntu.com/xenial/vcs/git
549
+ cat >"$PKGNAME/DEBIAN/control" <<EOF
550
+ Package: microsoft-git
551
+ Version: $VERSION
552
+ Section: vcs
553
+ Priority: optional
554
+ Architecture: $ARCH
555
+ Depends: libcurl3-gnutls, liberror-perl, libexpat1, libpcre2-8-0, perl, perl-modules, zlib1g
556
+ Maintainer: GitClient <[email protected] >
557
+ Description: Git client built from the https://github.com/microsoft/git repository,
558
+ specialized in supporting monorepo scenarios. Includes the Scalar CLI.
559
+ EOF
560
+
561
+ dpkg-deb -Zxz --build "$PKGNAME"
562
+ # Move Debian package for later artifact upload
563
+ mv "$PKGNAME.deb" "$GITHUB_WORKSPACE"
564
+
565
+ - name : Upload artifacts
566
+ uses : actions/upload-artifact@v4
567
+ with :
568
+ name : linux-artifacts
569
+ path : |
570
+ *.deb
571
+ # End build unsigned Debian package
0 commit comments