-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 89c8014
Showing
5 changed files
with
785 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
name: Compile Git Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
env: | ||
FORCE_COLOR: 1 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Download earthly | ||
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.22/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'" | ||
- name: Compile upstream git release | ||
run: earthly --use-inline-cache --save-inline-cache --strict +build --GIT_VERSION=${{github.ref_name}} | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: git | ||
path: ./dist/* | ||
if-no-files-found: error | ||
- name: Compress the binaries | ||
run: cd dist && tar -czvf ../git-binaries.linux-64bit.tar.gz * | ||
- name: Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "git-binaries.linux-64bit.tar.gz" | ||
allowUpdates: true | ||
removeArtifacts: true | ||
artifactErrorsFailBuild: true | ||
body: statically compiled git v${{github.ref_name}} from https://github.com/git/git/releases/tag/v${{github.ref_name}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
VERSION 0.6 | ||
|
||
FROM alpine | ||
|
||
RUN apk add --no-cache \ | ||
curl autoconf gcc flex bison make bash cmake libtool musl-dev g++ \ | ||
zlib-dev zlib-static \ | ||
tcl tk \ | ||
tcl-dev gettext | ||
|
||
ARG GIT_VERSION | ||
|
||
build: | ||
RUN curl -sL https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz -o git_v${GIT_VERSION}.tar.gz | ||
RUN tar zxf git_v${GIT_VERSION}.tar.gz | ||
WORKDIR /git-${GIT_VERSION} | ||
|
||
RUN make configure && sed -i 's/qversion/-version/g' configure | ||
RUN ./configure prefix=/dist/git-${GIT_VERSION} LDFLAGS="--static" CFLAGS="${CFLAGS} -static" && cat config.log | ||
RUN make && make install | ||
|
||
SAVE ARTIFACT /dist/git-${GIT_VERSION}/bin/* AS LOCAL ./dist/ |
Oops, something went wrong.