Skip to content

Commit

Permalink
ci: Add write permission and fix deprecations in GoReleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Breidenstein committed May 24, 2023
1 parent a6a97b1 commit ebb7331
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 21 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
tags:
- "*"

permissions:
contents: write # Allow to create new releaases

jobs:
goreleaser:
runs-on: ubuntu-latest
Expand All @@ -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 }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
json2env
dist/
24 changes: 24 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -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
20 changes: 0 additions & 20 deletions .goreleaser.yml

This file was deleted.

0 comments on commit ebb7331

Please sign in to comment.