@@ -457,3 +457,83 @@ jobs:
457457 git/.github/macos-installer/*.dmg
458458 git/.github/macos-installer/*.pkg
459459 # End build and sign Mac OSX installers
460+
461+ # Build unsigned Ubuntu package
462+ create-linux-artifacts :
463+ runs-on : ubuntu-latest
464+ needs : prereqs
465+ steps :
466+ - name : Install git dependencies
467+ run : |
468+ set -ex
469+ sudo apt-get update -q
470+ sudo apt-get install -y -q --no-install-recommends gettext libcurl4-gnutls-dev libpcre3-dev asciidoc xmlto
471+
472+ - name : Clone git
473+ uses : actions/checkout@v4
474+ with :
475+ path : git
476+
477+ - name : Build and create Debian package
478+ run : |
479+ set -ex
480+
481+ die () {
482+ echo "$*" >&2
483+ exit 1
484+ }
485+
486+ echo "${{ needs.prereqs.outputs.tag_version }}" >>git/version
487+ make -C git GIT-VERSION-FILE
488+
489+ VERSION="${{ needs.prereqs.outputs.tag_version }}"
490+
491+ ARCH="$(dpkg-architecture -q DEB_HOST_ARCH)"
492+ if test -z "$ARCH"; then
493+ die "Could not determine host architecture!"
494+ fi
495+
496+ PKGNAME="microsoft-git_$VERSION"
497+ PKGDIR="$(dirname $(pwd))/$PKGNAME"
498+
499+ rm -rf "$PKGDIR"
500+ mkdir -p "$PKGDIR"
501+
502+ DESTDIR="$PKGDIR" make -C git -j5 V=1 DEVELOPER=1 \
503+ USE_LIBPCRE=1 \
504+ NO_CROSS_DIRECTORY_HARDLINKS=1 \
505+ ASCIIDOC8=1 ASCIIDOC_NO_ROFF=1 \
506+ ASCIIDOC='TZ=UTC asciidoc' \
507+ prefix=/usr/local \
508+ gitexecdir=/usr/local/lib/git-core \
509+ libexecdir=/usr/local/lib/git-core \
510+ htmldir=/usr/local/share/doc/git/html \
511+ install install-doc install-html
512+
513+ cd ..
514+ mkdir "$PKGNAME/DEBIAN"
515+
516+ # Based on https://packages.ubuntu.com/xenial/vcs/git
517+ cat >"$PKGNAME/DEBIAN/control" <<EOF
518+ Package: microsoft-git
519+ Version: $VERSION
520+ Section: vcs
521+ Priority: optional
522+ Architecture: $ARCH
523+ Depends: libcurl3-gnutls, liberror-perl, libexpat1, libpcre2-8-0, perl, perl-modules, zlib1g
524+ Maintainer: GitClient <gitclient@microsoft.com>
525+ Description: Git client built from the https://github.com/microsoft/git repository,
526+ specialized in supporting monorepo scenarios. Includes the Scalar CLI.
527+ EOF
528+
529+ dpkg-deb -Zxz --build "$PKGNAME"
530+ # Move Debian package for later artifact upload
531+ mv "$PKGNAME.deb" "$GITHUB_WORKSPACE"
532+
533+ - name : Upload artifacts
534+ uses : actions/upload-artifact@v4
535+ with :
536+ name : linux-artifacts
537+ path : |
538+ *.deb
539+ # End build unsigned Debian package
0 commit comments