From 5887858d30b9cf56115c417a4963ddb517c04efb Mon Sep 17 00:00:00 2001 From: Steve Ramage Date: Wed, 10 Aug 2022 15:29:57 -0700 Subject: [PATCH] Resolves #188 - Fixes signing issue --- .github/workflows/test.yml | 11 ++++++++++- .goreleaser.yaml | 16 ++++++++-------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9bf60a6..fd3710c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,6 +50,15 @@ jobs: run: | go test -v -cover ./cmd/ ./external/... + - + name: Import GPG key + id: import_gpg + uses: crazy-max/ghaction-import-gpg@v5.0.0 + with: + # These secrets will need to be configured for the repository: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.GPG_PASSPHRASE }} + - name: Run GoReleaser (for Linux build and Syntax check) uses: goreleaser/goreleaser-action@v3 env: @@ -57,7 +66,7 @@ jobs: GOARCH: amd64 with: version: latest - args: build --single-target --snapshot + args: release --single-target --snapshot --skip-publish - name: 'Upload Artifact' uses: actions/upload-artifact@v3 diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 156a74b..5a4250d 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -16,15 +16,15 @@ builds: ldflags: - '-s -w -X github.com/elasticpath/epcc-cli/external/version.Version={{.Version}} -X github.com/elasticpath/epcc-cli/external/version.Commit={{.Commit}}' goos: - - freebsd - - windows +# - freebsd +# - windows - linux - - darwin +# - darwin goarch: - amd64 - - '386' - - arm - - arm64 +# - '386' +# - arm +# - arm64 ignore: - goos: darwin goarch: '386' @@ -56,7 +56,7 @@ signs: - artifacts: checksum args: # if you are using this in a GitHub action or some other automated pipeline, you - # need to pass the batch flag to indicate its not interactive. + # need to pass the batch flag to indicate it's not interactive. - "--batch" - "--local-user" - "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key @@ -109,4 +109,4 @@ announce: # # Attention: goreleaser doesn't check the full structure of the Slack API: please make sure that # your configuration for advanced message formatting abides by this API. - #attachments: [] \ No newline at end of file + #attachments: []