From 1da6a6c83f8e7c25cc3c13731947cfbc626680eb Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Sat, 27 Jun 2026 14:45:57 +0800 Subject: [PATCH 1/5] fix rel token --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04eebb32..91c96f6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,6 @@ permissions: contents: read env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BUILDKIT_PROGRESS: "plain" # Full logs for CI build. REGISTRY_SRC: ${{ vars.REGISTRY_SRC || 'docker.io' }} # For BASE_NAMESPACE of images: where to pull base images from, docker.io or other source registry URL. REGISTRY_DST: ${{ vars.REGISTRY_DST || 'quay.io' }} # For tags of built images: where to push images to, docker.io or other destination registry URL. @@ -74,6 +73,8 @@ jobs: build_goreleaser: runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: actions/checkout@v7 - uses: actions/setup-go@v6 @@ -106,7 +107,7 @@ jobs: - uses: goreleaser/goreleaser-action@v6 env: - GITHUB_TOKEN: ${{ secrets.GA_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: distribution: goreleaser version: latest From 8338751d91a26b12671e35aa148634421e413f6c Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Sat, 27 Jun 2026 14:52:05 +0800 Subject: [PATCH 2/5] fix build cache --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91c96f6c..1d3a2d63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,7 @@ jobs: uses: actions/setup-go@v6 with: go-version: "stable" # 1.26 + cache-dependency-path: src/supervisord/go.mod - name: Build Binary run: | set -eux @@ -80,6 +81,7 @@ jobs: - uses: actions/setup-go@v6 with: go-version: "stable" # 1.26 + cache-dependency-path: src/supervisord/go.mod - name: Install cross-compiler for linux/arm64, UPX env: @@ -105,7 +107,7 @@ jobs: - if: ${{ startsWith(github.ref, 'refs/tags/v') }} # if on a `tags/v*` git push, add `--skip=validate` to flags run: echo "flags=--skip=validate" >> $GITHUB_ENV - - uses: goreleaser/goreleaser-action@v6 + - uses: goreleaser/goreleaser-action@v7 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From f063640c8f45558bbe69caff24f0d237c16ae284 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Sat, 27 Jun 2026 14:58:34 +0800 Subject: [PATCH 3/5] upload artifacts --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d3a2d63..368a7d38 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -115,3 +115,10 @@ jobs: version: latest args: release --verbose --clean -f ../.goreleaser.yml ${{ env.flags }} workdir: src/supervisord + + - uses: actions/upload-artifact@v4 + with: + name: supervisord-binaries + path: src/supervisord/dist/ + if-no-files-found: error + retention-days: 7 From 882baf6dc25844345c84470b0a561128849d3802 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Sat, 27 Jun 2026 15:04:38 +0800 Subject: [PATCH 4/5] debug upx --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 368a7d38..f8c81fd0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,7 +95,7 @@ jobs: curl -o /tmp/TMP.txz -sL $URL_UPX && tar -C /opt/ -xJf /tmp/TMP.txz && rm /tmp/TMP.txz ; ln -sf /opt/upx-${VER_UPX}-amd64_linux /opt/upx export PATH="/opt/upx/:${PATH}" && upx --version | grep -E '^upx' - echo "/opt/upx" >> $GITHUB_PATH + # echo "/opt/upx" >> $GITHUB_PATH export VERSION=$( [[ "$GITHUB_REF" == refs/tags/* ]] && echo "${GITHUB_REF#refs/tags/}" || echo $(date +%Y.%m%d.%H%M) ) sed -i -E -e "s/v[0-9]+\.[0-9]+\.[0-9]+/${VERSION}/" -e "s/GIT_COMMIT_ID/${COMMIT_SHA}/" src/supervisord/version.go @@ -116,9 +116,9 @@ jobs: args: release --verbose --clean -f ../.goreleaser.yml ${{ env.flags }} workdir: src/supervisord - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: name: supervisord-binaries path: src/supervisord/dist/ if-no-files-found: error - retention-days: 7 + retention-days: 2 From 55a002f1bfff6aef0b6865f456eecc12c0b27f74 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Sat, 27 Jun 2026 15:12:02 +0800 Subject: [PATCH 5/5] debug releas files --- .github/workflows/ci.yml | 2 +- src/.goreleaser.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8c81fd0..f6f4d72f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,7 +95,7 @@ jobs: curl -o /tmp/TMP.txz -sL $URL_UPX && tar -C /opt/ -xJf /tmp/TMP.txz && rm /tmp/TMP.txz ; ln -sf /opt/upx-${VER_UPX}-amd64_linux /opt/upx export PATH="/opt/upx/:${PATH}" && upx --version | grep -E '^upx' - # echo "/opt/upx" >> $GITHUB_PATH + echo "/opt/upx" >> $GITHUB_PATH export VERSION=$( [[ "$GITHUB_REF" == refs/tags/* ]] && echo "${GITHUB_REF#refs/tags/}" || echo $(date +%Y.%m%d.%H%M) ) sed -i -E -e "s/v[0-9]+\.[0-9]+\.[0-9]+/${VERSION}/" -e "s/GIT_COMMIT_ID/${COMMIT_SHA}/" src/supervisord/version.go diff --git a/src/.goreleaser.yml b/src/.goreleaser.yml index b5cdc984..79197868 100644 --- a/src/.goreleaser.yml +++ b/src/.goreleaser.yml @@ -33,7 +33,7 @@ builds: env: - CGO_ENABLED=1 ldflags: - - "-linkmode external -extldflags -static" + - "-s -w -linkmode external -extldflags -static" flags: - -tags=release goos: @@ -95,6 +95,6 @@ release: name_template: "{{.ProjectName}}-v{{.Version}}" upx: - - enabled: true + - enabled: false ids: - static