diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4cd4205..0aa4682 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,9 @@ on: tags: - "*" +permissions: + contents: write # Allow to create new releaases + jobs: goreleaser: runs-on: ubuntu-latest @@ -24,6 +27,6 @@ jobs: uses: goreleaser/goreleaser-action@v4 with: version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 8729782..3c4e2fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ json2env +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..b5bea41 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,24 @@ +before: + hooks: + - go mod download + +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + +archives: + - id: foo + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + +checksum: + name_template: 'checksums.txt' + +changelog: + sort: asc diff --git a/.goreleaser.yml b/.goreleaser.yml deleted file mode 100644 index ccbb8a4..0000000 --- a/.goreleaser.yml +++ /dev/null @@ -1,20 +0,0 @@ -before: - hooks: - - go mod download - -builds: - - env: - - CGO_ENABLED=0 - goos: - - linux - -archives: - - replacements: - linux: Linux - amd64: x86_64 - -checksum: - name_template: 'checksums.txt' - -changelog: - sort: asc