Fix #221 by bumping Go. (#223)

* Fix #221 by bumping Go.

* CI: use golang:latest instead of GoReleaser's container image

* Add Go linker flag (-B gobuildid) to generate UUID.

---------

Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>
This commit is contained in:
Tim Peeters 2024-11-20 11:02:39 +01:00 committed by GitHub
parent 772336a7bd
commit 4c63cea062
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 5 deletions

View File

@ -28,15 +28,21 @@ task:
GORELEASER_KEY: ENCRYPTED[!9b80b6ef684ceaf40edd4c7af93014ee156c8aba7e6e5795f41c482729887b5c31f36b651491d790f1f668670888d9fd!]
FURY_TOKEN: ENCRYPTED[!97fe4497d9aca60a3d64904883b81e21f19706c6aedda625c97f62f67ec46b8efa74c55699956158bbf0a23726e7d9f6!]
container:
image: goreleaser/goreleaser-pro:latest
image: golang:latest
cpu: 4
memory: 12G
matrix:
- name: Release Binaries
only_if: $CIRRUS_TAG != ''
install_goreleaser_script:
- echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
- apt update && apt -y install goreleaser-pro
release_script: goreleaser
- name: Release Binaries (Dry Run)
only_if: $CIRRUS_TAG == ''
install_goreleaser_script:
- echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
- apt update && apt -y install goreleaser-pro
release_script: goreleaser release --skip=publish --snapshot --clean --verbose
binaries_artifacts:
path: "dist/orchard_*/orchard*"

View File

@ -10,6 +10,7 @@ builds:
ldflags: >
-X github.com/cirruslabs/orchard/internal/version.Version={{.Version}}
-X github.com/cirruslabs/orchard/internal/version.Commit={{.ShortCommit}}
-B gobuildid
env:
- CGO_ENABLED=0
goos:

View File

@ -1,4 +1,8 @@
FROM goreleaser/goreleaser-pro:latest as builder
FROM golang:latest as builder
# Install GoReleaser Pro
RUN echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
RUN apt update && apt -y install goreleaser-pro
WORKDIR /tmp/orchard
ADD . /tmp/orchard/

4
go.mod
View File

@ -1,8 +1,6 @@
module github.com/cirruslabs/orchard
go 1.21
toolchain go1.22.4
go 1.23.3
require (
github.com/avast/retry-go v3.0.0+incompatible