Skip to content

Commit

Permalink
Update release action to use newer actions. Use latest goreleaser ver…
Browse files Browse the repository at this point in the history
…sion. Use CGO_ENABLED in its config instead of tags.
  • Loading branch information
ncabatoff committed Apr 17, 2024
1 parent a3bc995 commit b2740a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Expand Up @@ -11,22 +11,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: '1.22'

- run: make test

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: "~> 0.182"
version: "~> 1.25"
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .goreleaser.yml
@@ -1,14 +1,14 @@
builds:
- main: cmd/process-exporter/main.go
binary: process-exporter
flags: -tags netgo
ldflags:
- -s -w
- -X github.com/prometheus/common/version.BuildDate={{.Date}}
- -X github.com/prometheus/common/version.BuildUser=goreleaser
- -X github.com/prometheus/common/version.Revision={{.FullCommit}}
- -X main.version={{.Version}}

env:
- CGO_ENABLED=0
goos:
- linux
goarch:
Expand Down

1 comment on commit b2740a6

@SuperQ
Copy link
Contributor

@SuperQ SuperQ commented on b2740a6 Apr 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the CGO_ENABLED=0 change. I just noticed in our ansible CI pipeline that we had failures becuase v0.7.11 is not a static binary.

prometheus-community/ansible#335

process-exporter-0.7.11.linux-amd64] $ ldd process-exporter 
	linux-vdso.so.1 (0x00007ffca57ba000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007b909d400000)
	/lib64/ld-linux-x86-64.so.2 (0x00007b909d692000)

Please sign in to comment.