From fb6dbde1987efcf8f20ca538f9bd32a763c47b7c Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Tue, 5 Mar 2024 14:12:48 +0530 Subject: [PATCH] Try an alternative action that allows tags prefixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit goreleases doesn't like it if we give it a tag with a prefix, as is our case with "cli-...". > тип release failed after 0s error=failed to parse tag 'cli-v0.0.0-rc2' as semver: Invalid Semantic Version --- .github/workflows/cli-release.yml | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/.github/workflows/cli-release.yml b/.github/workflows/cli-release.yml index 69d2026e5d..8d85dfec58 100644 --- a/.github/workflows/cli-release.yml +++ b/.github/workflows/cli-release.yml @@ -11,30 +11,18 @@ on: - "cli-v*" jobs: - goreleaser: + release-linux-amd64: runs-on: ubuntu-latest steps: - - name: Install latest Syft - run: | - wget $(curl -s https://api.github.com/repos/anchore/syft/releases/latest | grep 'browser_' | grep 'linux_amd64.rpm' | cut -d\" -f4) -O syft_latest_linux_amd64.rpm - sudo rpm -i syft_latest_linux_amd64.rpm - - name: Checkout code uses: actions/checkout@v4 - with: - # Required for the changelog to work correctly. - fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v5 + - uses: wangyoucao577/go-release-action@v1 with: - go-version: "1.20" - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v5 - with: - workdir: cli - args: release --clean - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN }} + goversion: "1.20" + project_path: "./cli" + sha256sum: true + goos: linux + goarch: amd64