From dab9b71c6a46773109504ad734898b1028a68fb2 Mon Sep 17 00:00:00 2001 From: Steve Ramage <steve.ramage@elasticpath.com> Date: Wed, 10 Aug 2022 16:47:11 -0700 Subject: [PATCH] Resolves #188 - Still can't release --- .github/workflows/test.yml | 22 +++++----------------- .goreleaser.yaml | 16 ++++++++-------- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 970ef6d..9bf60a6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,17 +28,6 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v3 - - name: Import GPG key - id: import_gpg - uses: crazy-max/ghaction-import-gpg@v5.1.0 - with: - # These secrets will need to be configured for the repository: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.PASSPHRASE }} - - - name: List keys - run: gpg -K - - name: Get dependencies run: | go mod download @@ -56,20 +45,19 @@ jobs: run: | go build -o ./bin/epcc -v ./cmd/ -# - name: Unit Tests -# timeout-minutes: 15 -# run: | -# go test -v -cover ./cmd/ ./external/... + - name: Unit Tests + timeout-minutes: 15 + run: | + go test -v -cover ./cmd/ ./external/... - name: Run GoReleaser (for Linux build and Syntax check) uses: goreleaser/goreleaser-action@v3 env: GOOS: linux GOARCH: amd64 - GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} with: version: latest - args: release --skip-publish + args: build --single-target --snapshot - name: 'Upload Artifact' uses: actions/upload-artifact@v3 diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 5a4250d..156a74b 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 it's not interactive. + # need to pass the batch flag to indicate its 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: [] + #attachments: [] \ No newline at end of file