diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04eebb32..f6f4d72f 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. @@ -57,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 @@ -74,11 +74,14 @@ jobs: build_goreleaser: runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: actions/checkout@v7 - 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: @@ -104,11 +107,18 @@ 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.GA_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: distribution: goreleaser version: latest args: release --verbose --clean -f ../.goreleaser.yml ${{ env.flags }} workdir: src/supervisord + + - uses: actions/upload-artifact@v7 + with: + name: supervisord-binaries + path: src/supervisord/dist/ + if-no-files-found: error + retention-days: 2 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