Skip to content

Commit

Permalink
add version using HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
swazau committed Jun 24, 2024
1 parent d673b25 commit 760486a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build-arm64-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
with:
repository: rfjakob/gocryptfs
ref: master
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
Expand All @@ -31,10 +32,13 @@ jobs:
- name: Generate go.sum
run: go mod tidy

- name: Get version info
run: echo "version=$(git describe --tags HEAD)" >> $GITHUB_ENV

- name: Build gocryptfs
run: |
LDFLAGS="-linkmode external -extldflags '-fno-PIC -static -Wl,--dynamic-linker=/system/bin/linker64'"
./build.bash --ldflags="$LDFLAGS" --goflags='-buildmode=pie' without_openssl
go build -ldflags "-X main.GitVersion=${{ env.version }} -X main.GitVersionFuse=${{ env.version }} -X main.BuildDate=$(date +%Y-%m-%d) \
-linkmode external -extldflags '-fno-PIC -static -Wl,--dynamic-linker=/system/bin/linker64'" -buildmode=pie -tags without_openssl -o gocryptfs
- name: Strip debug information
run: strip gocryptfs
Expand All @@ -43,4 +47,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: gocryptfs-arm64
path: ./gocryptfs
path: ./gocryptfs

0 comments on commit 760486a

Please sign in to comment.