From 5080693bd785eede1385e6d3e213506e3aa5aa82 Mon Sep 17 00:00:00 2001 From: Pablo RUTH Date: Mon, 17 Jun 2024 13:56:01 +0200 Subject: [PATCH] Upgrade Goreleaser v2 (#224) * upgrade goreleaser v2 * missing error check --------- Co-authored-by: Pablo RUTH --- .github/workflows/master.yml | 2 +- .github/workflows/pr.yml | 2 +- .github/workflows/tag.yml | 2 +- .goreleaser.yml | 4 +++- cmd/hash.go | 5 ++++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 1d1f871..7f0cb7e 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -25,7 +25,7 @@ jobs: uses: goreleaser/goreleaser-action@v2 with: version: latest - args: release --snapshot --skip-sign --clean + args: release --snapshot --skip=sign --clean env: GORELEASER_CURRENT_TAG: ${{ github.run_id }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 2d51dce..b1a70e5 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -22,7 +22,7 @@ jobs: uses: goreleaser/goreleaser-action@v2 with: version: latest - args: release --snapshot --skip-sign --clean + args: release --snapshot --skip=sign --clean - uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 850aac5..663ec97 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -75,4 +75,4 @@ jobs: git config --local user.name "GitHub Action" git add . git commit -m "Add new rpm files" - git push \ No newline at end of file + git push diff --git a/.goreleaser.yml b/.goreleaser.yml index 3358d36..91f2e87 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,3 +1,5 @@ +version: 2 + before: hooks: - go mod download @@ -33,7 +35,7 @@ signs: - "--detach-sign" - "${artifact}" changelog: - skip: true + disable: true nfpms: - maintainer: Pablo RUTH homepage: https://github.com/signmykeyio/signmykey diff --git a/cmd/hash.go b/cmd/hash.go index fd00108..7182478 100644 --- a/cmd/hash.go +++ b/cmd/hash.go @@ -29,7 +29,10 @@ var hashCmd = &cobra.Command{ fmt.Printf("\nDo you want to use One Time Codes e.g. Google authenticator? (Y/N) ") var useOtp string - fmt.Scanln(&useOtp) + _, err = fmt.Scanln(&useOtp) + if err != nil { + return err + } if useOtp == "Y" || useOtp == "y" { seed := util.GenerateSeed()