Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 5 additions & 30 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: GoReleaer
name: GoReleaser

on:
release:
Expand All @@ -13,32 +13,7 @@ permissions:

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Checkout latest tag (workflow_run path)
if: github.event_name == 'workflow_run'
run: |
git fetch origin --tags --force
LATEST_TAG=$(git tag --sort=-v:refname | head -n 1)
if [[ -z "${LATEST_TAG}" ]]; then
echo "::error::no tags present in repo"
exit 1
fi
echo "Checking out latest tag: ${LATEST_TAG}"
git checkout "${LATEST_TAG}"
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: sei-protocol/uci/.github/workflows/goreleaser-release.yml@monty/goreleaser-reusable-workflow
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reusable workflow pinned to ephemeral feature branch

High Severity

The uses reference points to a mutable feature branch (@monty/goreleaser-reusable-workflow) rather than a pinned tag. Every other reusable workflow call in this repo is pinned to @v0.0.3. Once the upstream PR (uci#35) merges, this branch will likely be deleted, causing the workflow to fail with a "ref not found" error on every release. The PR description acknowledges this needs to be bumped to a tag before merge, but the workflow as committed would break if merged in its current state.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a7d2684. Configure here.

with:
go-version-file: go.mod
checkout-latest-tag: ${{ github.event_name == 'workflow_run' }}
Loading