File tree Expand file tree Collapse file tree 5 files changed +785
-0
lines changed Expand file tree Collapse file tree 5 files changed +785
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ name : Compile Git Release
3
+
4
+ on :
5
+ push :
6
+ tags :
7
+ - ' [0-9]+.[0-9]+.[0-9]+'
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-latest
12
+ permissions :
13
+ contents : write
14
+ env :
15
+ FORCE_COLOR : 1
16
+ steps :
17
+ - uses : actions/checkout@v3
18
+ - name : Download earthly
19
+ 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'"
20
+ - name : Compile upstream git release
21
+ run : earthly --use-inline-cache --save-inline-cache --strict +build --GIT_VERSION=${{github.ref_name}}
22
+ - name : Upload build artifacts
23
+ uses : actions/upload-artifact@v3
24
+ with :
25
+ name : git
26
+ path : ./dist/*
27
+ if-no-files-found : error
28
+ - name : Compress the binaries
29
+ run : cd dist && tar -czvf ../git-binaries.linux-64bit.tar.gz *
30
+ - name : Release
31
+ uses : ncipollo/release-action@v1
32
+ with :
33
+ artifacts : " git-binaries.linux-64bit.tar.gz"
34
+ allowUpdates : true
35
+ removeArtifacts : true
36
+ artifactErrorsFailBuild : true
37
+ body : statically compiled git v${{github.ref_name}} from https://github.com/git/git/releases/tag/v${{github.ref_name}}
Original file line number Diff line number Diff line change
1
+ /dist
Original file line number Diff line number Diff line change
1
+ VERSION 0.6
2
+
3
+ FROM alpine
4
+
5
+ RUN apk add --no-cache \
6
+ curl autoconf gcc flex bison make bash cmake libtool musl-dev g++ \
7
+ zlib-dev zlib-static \
8
+ tcl tk \
9
+ tcl-dev gettext
10
+
11
+ ARG GIT_VERSION
12
+
13
+ build :
14
+ RUN curl -sL https://github.com/git/git/archive/v${GIT_VERSION }.tar.gz -o git_v${GIT_VERSION }.tar.gz
15
+ RUN tar zxf git_v${GIT_VERSION }.tar.gz
16
+ WORKDIR /git-${GIT_VERSION }
17
+
18
+ RUN make configure && sed -i 's/qversion/-version/g' configure
19
+ RUN ./configure prefix= /dist/git-${GIT_VERSION } LDFLAGS= "--static" CFLAGS= "${CFLAGS} -static" && cat config.log
20
+ RUN make && make install
21
+
22
+ SAVE ARTIFACT /dist/git-${GIT_VERSION}/bin/* AS LOCAL ./dist/
You can’t perform that action at this time.
0 commit comments