From 4d063bad61a4f120803b2943cf65c7b86d53e614 Mon Sep 17 00:00:00 2001 From: felipecr Date: Sun, 31 Aug 2025 20:24:55 +0200 Subject: [PATCH 1/3] improved metadata pass in pipeline --- .github/workflows/release-opensuse156.yml | 40 ++++++++++++----------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release-opensuse156.yml b/.github/workflows/release-opensuse156.yml index a30a834..7f3105b 100644 --- a/.github/workflows/release-opensuse156.yml +++ b/.github/workflows/release-opensuse156.yml @@ -1,9 +1,9 @@ name: Release opensuse 15.6 amd64 and arm64 on: - push: - tags: - - 'v*.*.*' + push: {} + # tags: + # - 'v*.*.*' permissions: contents: write @@ -59,13 +59,15 @@ jobs: GOFLAGS: "-buildvcs=false" GO_LDFLAGS: "-linkmode external" CGO_LDFLAGS: "-g -O2" - VERSION_LDFLAGS: "-X parallax/common.Version=${{ github.ref_name }} \ - -X parallax/common.Commit=${{ github.sha }} \ - -X parallax/common.BuildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ)" run: | mkdir -p dist + BUILD_DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)" + go build -v -x \ - -ldflags "$GO_LDFLAGS $VERSION_LDFLAGS" \ + -ldflags "$GO_LDFLAGS \ + -X=parallax/common.Version=${{ github.ref_name }} \ + -X=parallax/common.Commit=${{ github.sha }} \ + -X=parallax/common.BuildDate=${BUILD_DATE}" \ -o dist/parallax-${{ github.ref_name }}-opensuse-15.6-${{ matrix.arch }} \ . @@ -75,15 +77,15 @@ jobs: readelf -l dist/parallax-${{ github.ref_name }}-opensuse-15.6-${{ matrix.arch }} | grep interpreter || true ldd dist/parallax-${{ github.ref_name }}-opensuse-15.6-${{ matrix.arch }} || echo "static :/" - - name: Create or Update GitHub Release and Upload Asset - uses: ncipollo/release-action@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ github.ref_name }} - name: Release ${{ github.ref_name }} - artifacts: dist/parallax-${{ github.ref_name }}-opensuse-15.6-${{ matrix.arch }} - allowUpdates: true - replacesArtifacts: false - draft: false - prerelease: false - + # - name: Create or Update GitHub Release and Upload Asset + # uses: ncipollo/release-action@v1 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # tag: ${{ github.ref_name }} + # name: Release ${{ github.ref_name }} + # artifacts: dist/parallax-${{ github.ref_name }}-opensuse-15.6-${{ matrix.arch }} + # allowUpdates: true + # replacesArtifacts: false + # draft: false + # prerelease: false + # From 2669df0803947eabbaa80b9b171b838346ab281d Mon Sep 17 00:00:00 2001 From: felipecr Date: Sun, 31 Aug 2025 20:30:31 +0200 Subject: [PATCH 2/3] backport metadata injection fix to opensuse 15.5 to keep implementation parity --- .github/workflows/release.yml | 40 ++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d96fc70..ceab03e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,9 @@ name: Release opensuse 15.5 amd64 and arm64 on: - push: - tags: - - 'v*.*.*' + push: {} + # tags: + # - 'v*.*.*' permissions: contents: write @@ -59,13 +59,15 @@ jobs: GOFLAGS: "-buildvcs=false" GO_LDFLAGS: "-linkmode external" CGO_LDFLAGS: "-g -O2" - VERSION_LDFLAGS: "-X parallax/common.Version=${{ github.ref_name }} \ - -X parallax/common.Commit=${{ github.sha }} \ - -X parallax/common.BuildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ)" run: | mkdir -p dist + BUILD_DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)" + go build -v -x \ - -ldflags "$GO_LDFLAGS $VERSION_LDFLAGS" \ + -ldflags "$GO_LDFLAGS \ + -X=parallax/common.Version=${{ github.ref_name }} \ + -X=parallax/common.Commit=${{ github.sha }} \ + -X=parallax/common.BuildDate=${BUILD_DATE}" \ -o dist/parallax-${{ github.ref_name }}-opensuse-15.5-${{ matrix.arch }} \ . @@ -75,15 +77,15 @@ jobs: readelf -l dist/parallax-${{ github.ref_name }}-opensuse-15.5-${{ matrix.arch }} | grep interpreter || true ldd dist/parallax-${{ github.ref_name }}-opensuse-15.5-${{ matrix.arch }} || echo "static :/" - - name: Create or Update GitHub Release and Upload Asset - uses: ncipollo/release-action@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ github.ref_name }} - name: Release ${{ github.ref_name }} - artifacts: dist/parallax-${{ github.ref_name }}-opensuse-15.5-${{ matrix.arch }} - allowUpdates: true - replacesArtifacts: false - draft: false - prerelease: false - + # - name: Create or Update GitHub Release and Upload Asset + # uses: ncipollo/release-action@v1 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # tag: ${{ github.ref_name }} + # name: Release ${{ github.ref_name }} + # artifacts: dist/parallax-${{ github.ref_name }}-opensuse-15.5-${{ matrix.arch }} + # allowUpdates: true + # replacesArtifacts: false + # draft: false + # prerelease: false + # From fc9ac65e81b4ac9f0afa14a2e5dba0a3c3a88ce0 Mon Sep 17 00:00:00 2001 From: felipecr Date: Sun, 31 Aug 2025 20:35:16 +0200 Subject: [PATCH 3/3] release ready workflows with metadata injection --- .github/workflows/release-opensuse156.yml | 30 +++++++++++------------ .github/workflows/release.yml | 30 +++++++++++------------ 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/release-opensuse156.yml b/.github/workflows/release-opensuse156.yml index 7f3105b..2019e22 100644 --- a/.github/workflows/release-opensuse156.yml +++ b/.github/workflows/release-opensuse156.yml @@ -1,9 +1,9 @@ name: Release opensuse 15.6 amd64 and arm64 on: - push: {} - # tags: - # - 'v*.*.*' + push: + tags: + - 'v*.*.*' permissions: contents: write @@ -77,15 +77,15 @@ jobs: readelf -l dist/parallax-${{ github.ref_name }}-opensuse-15.6-${{ matrix.arch }} | grep interpreter || true ldd dist/parallax-${{ github.ref_name }}-opensuse-15.6-${{ matrix.arch }} || echo "static :/" - # - name: Create or Update GitHub Release and Upload Asset - # uses: ncipollo/release-action@v1 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # tag: ${{ github.ref_name }} - # name: Release ${{ github.ref_name }} - # artifacts: dist/parallax-${{ github.ref_name }}-opensuse-15.6-${{ matrix.arch }} - # allowUpdates: true - # replacesArtifacts: false - # draft: false - # prerelease: false - # + - name: Create or Update GitHub Release and Upload Asset + uses: ncipollo/release-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref_name }} + name: Release ${{ github.ref_name }} + artifacts: dist/parallax-${{ github.ref_name }}-opensuse-15.6-${{ matrix.arch }} + allowUpdates: true + replacesArtifacts: false + draft: false + prerelease: false + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ceab03e..b432b5e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,9 @@ name: Release opensuse 15.5 amd64 and arm64 on: - push: {} - # tags: - # - 'v*.*.*' + push: + tags: + - 'v*.*.*' permissions: contents: write @@ -77,15 +77,15 @@ jobs: readelf -l dist/parallax-${{ github.ref_name }}-opensuse-15.5-${{ matrix.arch }} | grep interpreter || true ldd dist/parallax-${{ github.ref_name }}-opensuse-15.5-${{ matrix.arch }} || echo "static :/" - # - name: Create or Update GitHub Release and Upload Asset - # uses: ncipollo/release-action@v1 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # tag: ${{ github.ref_name }} - # name: Release ${{ github.ref_name }} - # artifacts: dist/parallax-${{ github.ref_name }}-opensuse-15.5-${{ matrix.arch }} - # allowUpdates: true - # replacesArtifacts: false - # draft: false - # prerelease: false - # + - name: Create or Update GitHub Release and Upload Asset + uses: ncipollo/release-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref_name }} + name: Release ${{ github.ref_name }} + artifacts: dist/parallax-${{ github.ref_name }}-opensuse-15.5-${{ matrix.arch }} + allowUpdates: true + replacesArtifacts: false + draft: false + prerelease: false +