From aac68099fcb77078a471758b93ec240d15f83c2b Mon Sep 17 00:00:00 2001 From: Sergio Maria Matone Date: Tue, 23 Jul 2024 14:41:25 +0200 Subject: [PATCH] spinning workflow without go mod tags --- .github/goreleaser.yaml | 212 +++++++++++++-------------- .github/workflows/release-binary.yml | 8 +- 2 files changed, 110 insertions(+), 110 deletions(-) diff --git a/.github/goreleaser.yaml b/.github/goreleaser.yaml index 889b86e..8d66d06 100644 --- a/.github/goreleaser.yaml +++ b/.github/goreleaser.yaml @@ -21,8 +21,8 @@ builds: - 6 - 7 -gomod: - proxy: true +# gomod: +# proxy: true archives: # https://goreleaser.com/customization/archive/ @@ -31,110 +31,110 @@ archives: - LICENSE - README.md -signs: - - cmd: cosign - env: - - COSIGN_EXPERIMENTAL=1 - certificate: '${artifact}.pem' - args: - - sign-blob - - '--output-certificate=${certificate}' - - '--output-signature=${signature}' - - '${artifact}' - - "--yes" # needed on cosign 2.0.0+ - artifacts: checksum - output: true - -dockers: - # https://goreleaser.com/customization/docker/ - - use: buildx - dockerfile: Dockerfile.release - goos: linux - goarch: amd64 - image_templates: - - "ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-amd64" - - "ghcr.io/gnolang/{{ .ProjectName }}:latest-amd64" - build_flag_templates: - - "--platform=linux/amd64" - - "--label=org.opencontainers.image.created={{.Date}}" - - "--label=org.opencontainers.image.title={{.ProjectName}}" - - "--label=org.opencontainers.image.revision={{.FullCommit}}" - - "--label=org.opencontainers.image.version={{.Version}}" - extra_files: - - scripts - - use: buildx - dockerfile: Dockerfile.release - goos: linux - goarch: arm64 - image_templates: - - "ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-arm64v8" - - "ghcr.io/gnolang/{{ .ProjectName }}:latest-arm64v8" - build_flag_templates: - - "--platform=linux/arm64/v8" - - "--label=org.opencontainers.image.created={{.Date}}" - - "--label=org.opencontainers.image.title={{.ProjectName}}" - - "--label=org.opencontainers.image.revision={{.FullCommit}}" - - "--label=org.opencontainers.image.version={{.Version}}" - extra_files: - - scripts - - use: buildx - dockerfile: Dockerfile.release - goos: linux - goarch: arm - goarm: 6 - image_templates: - - "ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-armv6" - - "ghcr.io/gnolang/{{ .ProjectName }}:latest-armv6" - build_flag_templates: - - "--platform=linux/arm/v6" - - "--label=org.opencontainers.image.created={{.Date}}" - - "--label=org.opencontainers.image.title={{.ProjectName}}" - - "--label=org.opencontainers.image.revision={{.FullCommit}}" - - "--label=org.opencontainers.image.version={{.Version}}" - extra_files: - - scripts - - use: buildx - dockerfile: Dockerfile.release - goos: linux - goarch: arm - goarm: 7 - image_templates: - - "ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-armv7" - - "ghcr.io/gnolang/{{ .ProjectName }}:latest-armv7" - build_flag_templates: - - "--platform=linux/arm/v7" - - "--label=org.opencontainers.image.created={{.Date}}" - - "--label=org.opencontainers.image.title={{.ProjectName}}" - - "--label=org.opencontainers.image.revision={{.FullCommit}}" - - "--label=org.opencontainers.image.version={{.Version}}" - extra_files: - - scripts - -docker_manifests: - # https://goreleaser.com/customization/docker_manifest/ - - name_template: ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }} - image_templates: - - ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-amd64 - - ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-arm64v8 - - ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-armv6 - - ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-armv7 - - name_template: ghcr.io/gnolang/{{ .ProjectName }}:latest - image_templates: - - ghcr.io/gnolang/{{ .ProjectName }}:latest-amd64 - - ghcr.io/gnolang/{{ .ProjectName }}:latest-arm64v8 - - ghcr.io/gnolang/{{ .ProjectName }}:latest-armv6 - - ghcr.io/gnolang/{{ .ProjectName }}:latest-armv7 - -docker_signs: - - cmd: cosign - env: - - COSIGN_EXPERIMENTAL=1 - artifacts: images - output: true - args: - - 'sign' - - '${artifact}' - - "--yes" # needed on cosign 2.0.0+ +# signs: +# - cmd: cosign +# env: +# - COSIGN_EXPERIMENTAL=1 +# certificate: '${artifact}.pem' +# args: +# - sign-blob +# - '--output-certificate=${certificate}' +# - '--output-signature=${signature}' +# - '${artifact}' +# - "--yes" # needed on cosign 2.0.0+ +# artifacts: checksum +# output: true + +# dockers: +# # https://goreleaser.com/customization/docker/ +# - use: buildx +# dockerfile: Dockerfile.release +# goos: linux +# goarch: amd64 +# image_templates: +# - "ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-amd64" +# - "ghcr.io/gnolang/{{ .ProjectName }}:latest-amd64" +# build_flag_templates: +# - "--platform=linux/amd64" +# - "--label=org.opencontainers.image.created={{.Date}}" +# - "--label=org.opencontainers.image.title={{.ProjectName}}" +# - "--label=org.opencontainers.image.revision={{.FullCommit}}" +# - "--label=org.opencontainers.image.version={{.Version}}" +# extra_files: +# - scripts +# - use: buildx +# dockerfile: Dockerfile.release +# goos: linux +# goarch: arm64 +# image_templates: +# - "ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-arm64v8" +# - "ghcr.io/gnolang/{{ .ProjectName }}:latest-arm64v8" +# build_flag_templates: +# - "--platform=linux/arm64/v8" +# - "--label=org.opencontainers.image.created={{.Date}}" +# - "--label=org.opencontainers.image.title={{.ProjectName}}" +# - "--label=org.opencontainers.image.revision={{.FullCommit}}" +# - "--label=org.opencontainers.image.version={{.Version}}" +# extra_files: +# - scripts +# - use: buildx +# dockerfile: Dockerfile.release +# goos: linux +# goarch: arm +# goarm: 6 +# image_templates: +# - "ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-armv6" +# - "ghcr.io/gnolang/{{ .ProjectName }}:latest-armv6" +# build_flag_templates: +# - "--platform=linux/arm/v6" +# - "--label=org.opencontainers.image.created={{.Date}}" +# - "--label=org.opencontainers.image.title={{.ProjectName}}" +# - "--label=org.opencontainers.image.revision={{.FullCommit}}" +# - "--label=org.opencontainers.image.version={{.Version}}" +# extra_files: +# - scripts +# - use: buildx +# dockerfile: Dockerfile.release +# goos: linux +# goarch: arm +# goarm: 7 +# image_templates: +# - "ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-armv7" +# - "ghcr.io/gnolang/{{ .ProjectName }}:latest-armv7" +# build_flag_templates: +# - "--platform=linux/arm/v7" +# - "--label=org.opencontainers.image.created={{.Date}}" +# - "--label=org.opencontainers.image.title={{.ProjectName}}" +# - "--label=org.opencontainers.image.revision={{.FullCommit}}" +# - "--label=org.opencontainers.image.version={{.Version}}" +# extra_files: +# - scripts + +# docker_manifests: +# # https://goreleaser.com/customization/docker_manifest/ +# - name_template: ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }} +# image_templates: +# - ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-amd64 +# - ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-arm64v8 +# - ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-armv6 +# - ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-armv7 +# - name_template: ghcr.io/gnolang/{{ .ProjectName }}:latest +# image_templates: +# - ghcr.io/gnolang/{{ .ProjectName }}:latest-amd64 +# - ghcr.io/gnolang/{{ .ProjectName }}:latest-arm64v8 +# - ghcr.io/gnolang/{{ .ProjectName }}:latest-armv6 +# - ghcr.io/gnolang/{{ .ProjectName }}:latest-armv7 + +# docker_signs: +# - cmd: cosign +# env: +# - COSIGN_EXPERIMENTAL=1 +# artifacts: images +# output: true +# args: +# - 'sign' +# - '${artifact}' +# - "--yes" # needed on cosign 2.0.0+ checksum: name_template: 'checksums.txt' diff --git a/.github/workflows/release-binary.yml b/.github/workflows/release-binary.yml index 5507c25..ce4b204 100644 --- a/.github/workflows/release-binary.yml +++ b/.github/workflows/release-binary.yml @@ -7,8 +7,8 @@ permissions: on: push: - tags: - - "v*" + # tags: + # - "v*" jobs: binary: @@ -17,7 +17,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.21 + go-version: 1.22 - uses: sigstore/cosign-installer@v3.5.0 - uses: anchore/sbom-action/download-syft@v0.17.0 @@ -40,6 +40,6 @@ jobs: uses: goreleaser/goreleaser-action@v6 with: version: latest - args: release --clean --config ./.github/goreleaser.yaml + args: release --draft --clean --config ./.github/goreleaser.yaml --verbose env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"