Try an alternative action that allows tags prefixes

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
This commit is contained in:
Manav Rathi 2024-03-05 14:12:48 +05:30
parent 76968d915e
commit fb6dbde198

View File

@ -11,30 +11,18 @@ on:
- "cli-v*" - "cli-v*"
jobs: jobs:
goreleaser: release-linux-amd64:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: 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 - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
# Required for the changelog to work correctly.
fetch-depth: 0
- name: Set up Go - uses: wangyoucao577/go-release-action@v1
uses: actions/setup-go@v5
with: with:
go-version: "1.20" github_token: ${{ secrets.GITHUB_TOKEN }}
goversion: "1.20"
- name: Run GoReleaser project_path: "./cli"
uses: goreleaser/goreleaser-action@v5 sha256sum: true
with: goos: linux
workdir: cli goarch: amd64
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}