From c972c79630ae2a8898674e2e3929e2992b91086a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Parada?= Date: Thu, 6 Jun 2024 11:02:17 -0400 Subject: [PATCH] ci: run goreleaser on tag (#78) * ci: run goreleaser on tag * set goreleaser version to 2 in config --- .github/workflows/ci.yaml | 8 ++++---- .gitignore | 2 ++ .goreleaser.yaml | 4 ++++ .goreleaser.yml | 2 -- 4 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 .goreleaser.yaml delete mode 100644 .goreleaser.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3bf334f..475373b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -78,7 +78,7 @@ jobs: ./output/ - name: Upload coverage to Codecov - if: ${{ github.event_name != 'pull_request' }} + if: startsWith(github.ref, 'refs/tags/') uses: codecov/codecov-action@v4 with: file: ./coverage.out @@ -86,12 +86,12 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} - name: Install Syft for sboms - if: ${{ github.event_name != 'pull_request' }} + if: startsWith(github.ref, 'refs/tags/') run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin shell: bash - name: Import GPG key - if: ${{ github.event_name != 'pull_request' }} + if: startsWith(github.ref, 'refs/tags/') id: import_gpg uses: crazy-max/ghaction-import-gpg@v6 with: @@ -99,7 +99,7 @@ jobs: passphrase: ${{ secrets.CALYPTIA_GPG_KEY_PASSPHRASE }} - name: Run GoReleaser - if: ${{ github.event_name != 'pull_request' }} + if: startsWith(github.ref, 'refs/tags/') uses: goreleaser/goreleaser-action@v6 with: version: latest diff --git a/.gitignore b/.gitignore index fe986c3..4f12e54 100644 --- a/.gitignore +++ b/.gitignore @@ -351,3 +351,5 @@ $RECYCLE.BIN/ *.lnk # End of https://www.toptal.com/developers/gitignore/api/go,macos,linux,windows,executable,git,visualstudiocode,goland,vim,c++,c + +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..c07ab45 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,4 @@ +version: 2 + +builds: + - skip: true diff --git a/.goreleaser.yml b/.goreleaser.yml deleted file mode 100644 index 2caa5fb..0000000 --- a/.goreleaser.yml +++ /dev/null @@ -1,2 +0,0 @@ -builds: -- skip: true