Skip to content

Commit 2669df0

Browse files
committed
backport metadata injection fix to opensuse 15.5 to keep implementation parity
1 parent 4d063ba commit 2669df0

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

.github/workflows/release.yml

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Release opensuse 15.5 amd64 and arm64
22

33
on:
4-
push:
5-
tags:
6-
- 'v*.*.*'
4+
push: {}
5+
# tags:
6+
# - 'v*.*.*'
77

88
permissions:
99
contents: write
@@ -59,13 +59,15 @@ jobs:
5959
GOFLAGS: "-buildvcs=false"
6060
GO_LDFLAGS: "-linkmode external"
6161
CGO_LDFLAGS: "-g -O2"
62-
VERSION_LDFLAGS: "-X parallax/common.Version=${{ github.ref_name }} \
63-
-X parallax/common.Commit=${{ github.sha }} \
64-
-X parallax/common.BuildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ)"
6562
run: |
6663
mkdir -p dist
64+
BUILD_DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
65+
6766
go build -v -x \
68-
-ldflags "$GO_LDFLAGS $VERSION_LDFLAGS" \
67+
-ldflags "$GO_LDFLAGS \
68+
-X=parallax/common.Version=${{ github.ref_name }} \
69+
-X=parallax/common.Commit=${{ github.sha }} \
70+
-X=parallax/common.BuildDate=${BUILD_DATE}" \
6971
-o dist/parallax-${{ github.ref_name }}-opensuse-15.5-${{ matrix.arch }} \
7072
.
7173
@@ -75,15 +77,15 @@ jobs:
7577
readelf -l dist/parallax-${{ github.ref_name }}-opensuse-15.5-${{ matrix.arch }} | grep interpreter || true
7678
ldd dist/parallax-${{ github.ref_name }}-opensuse-15.5-${{ matrix.arch }} || echo "static :/"
7779
78-
- name: Create or Update GitHub Release and Upload Asset
79-
uses: ncipollo/release-action@v1
80-
with:
81-
token: ${{ secrets.GITHUB_TOKEN }}
82-
tag: ${{ github.ref_name }}
83-
name: Release ${{ github.ref_name }}
84-
artifacts: dist/parallax-${{ github.ref_name }}-opensuse-15.5-${{ matrix.arch }}
85-
allowUpdates: true
86-
replacesArtifacts: false
87-
draft: false
88-
prerelease: false
89-
80+
# - name: Create or Update GitHub Release and Upload Asset
81+
# uses: ncipollo/release-action@v1
82+
# with:
83+
# token: ${{ secrets.GITHUB_TOKEN }}
84+
# tag: ${{ github.ref_name }}
85+
# name: Release ${{ github.ref_name }}
86+
# artifacts: dist/parallax-${{ github.ref_name }}-opensuse-15.5-${{ matrix.arch }}
87+
# allowUpdates: true
88+
# replacesArtifacts: false
89+
# draft: false
90+
# prerelease: false
91+
#

0 commit comments

Comments
 (0)