From 1d0cceb9b8b138356b05c67ed45cc39f075c1187 Mon Sep 17 00:00:00 2001 From: Alexis Bouchez Date: Tue, 15 Oct 2024 17:40:58 +0200 Subject: [PATCH] fix goreleaser (or at least, trying...) --- .github/workflows/release.yml | 14 +++++----- .goreleaser.yml | 49 +--------------------------------- cmd/valyent/main.go => main.go | 0 3 files changed, 8 insertions(+), 55 deletions(-) rename cmd/valyent/main.go => main.go (100%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 434c669..63930ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,17 +12,17 @@ jobs: goreleaser: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v4 with: fetch-depth: 0 - - run: git fetch --force --tags - - uses: actions/setup-go@v4 - with: - go-version: stable - - uses: goreleaser/goreleaser-action@v5 + - name: Set up Go + uses: actions/setup-go@v5 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser - version: ${{ env.GITHUB_REF_NAME }} + version: "~> v2" args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 6d5f08d..dd63895 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,48 +1 @@ -# This is an example .goreleaser.yml file with some sensible defaults. -# Make sure to check the documentation at https://goreleaser.com -before: - hooks: - # You may remove this if you don't use go modules. - - go mod tidy - # you may remove this if you don't need go generate - - go generate ./... -builds: - - id: valyent - binary: valyent - env: - - CGO_ENABLED=0 - goos: - - linux - - windows - - darwin - -archives: - - format: tar.gz - # this name template makes the OS and Arch compatible with the results of uname. - name_template: >- - {{ .ProjectName }}_ - {{- title .Os }}_ - {{- if eq .Arch "amd64" }}x86_64 - {{- else if eq .Arch "386" }}i386 - {{- else }}{{ .Arch }}{{ end }} - {{- if .Arm }}v{{ .Arm }}{{ end }} - # use zip for windows archives - format_overrides: - - goos: windows - format: zip -universal_binaries: - - replace: true -checksum: - name_template: "checksums.txt" -snapshot: - name_template: "{{ incpatch .Version }}-next" -changelog: - sort: asc - filters: - exclude: - - "^docs:" - - "^test:" -# The lines beneath this are called `modelines`. See `:help modeline` -# Feel free to remove those if you don't want/use them. -# yaml-language-server: $schema=https://goreleaser.com/static/schema.json -# vim: set ts=2 sw=2 tw=0 fo=cnqoj +project_name: valyent diff --git a/cmd/valyent/main.go b/main.go similarity index 100% rename from cmd/valyent/main.go rename to main.go