Skip to content

feat: improve workflows#14

Merged
grota merged 1 commit intomainfrom
improve_wf
Mar 20, 2026
Merged

feat: improve workflows#14
grota merged 1 commit intomainfrom
improve_wf

Conversation

@grota
Copy link
Copy Markdown
Member

@grota grota commented Mar 20, 2026

PR Type

Enhancement, Other


Description

  • Restrict lint and test workflows to PR events on main only

  • Remove issues: write permission from release-please workflow

  • Remove redundant Fetch tags step from release workflow


Diagram Walkthrough

flowchart LR
  A["lint.yml"] -- "removed push trigger\nkept PR to main only" --> B["Lint Workflow"]
  C["test.yml"] -- "removed push trigger\nkept PR to main only" --> D["Test Workflow"]
  E["release-please.yml"] -- "removed issues:write\nremoved fetch tags step" --> F["Release Workflow"]
Loading

File Walkthrough

Relevant files
Configuration changes
lint.yml
Restrict lint workflow to PRs targeting main                         

.github/workflows/lint.yml

  • Removed push trigger for main and develop branches
  • Kept only pull_request trigger targeting main branch
+0/-5     
release-please.yml
Remove unused permission and fetch tags step                         

.github/workflows/release-please.yml

  • Removed issues: write permission from workflow permissions
  • Removed the Fetch tags step from the release job
+0/-5     
test.yml
Restrict test workflow to PRs targeting main                         

.github/workflows/test.yml

  • Removed push trigger for main and develop branches
  • Kept only pull_request trigger targeting main branch
+0/-5     

@grota grota merged commit b6bf2a8 into main Mar 20, 2026
4 checks passed
@grota grota deleted the improve_wf branch March 20, 2026 15:14
@sparkfabrik-ai-bot
Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Removed Fetch Tags

The Fetch tags step (git fetch --force --tags) was removed before the GoReleaser action. GoReleaser typically requires all tags to be present to correctly determine the previous tag for changelog generation and version comparison. Removing this step may cause GoReleaser to fail or produce incorrect release notes if the shallow clone used by actions/checkout does not include all tags.

- name: Run GoReleaser
  if: ${{ steps.release.outputs.release_created }}
  uses: goreleaser/goreleaser-action@v6
  with:
Invalid Go Version

The Go version specified is 1.25.6, which does not exist as of the current date. The latest stable Go versions are in the 1.22.x/1.23.x range. This may cause the actions/setup-go step to fail when a release is created.

go-version: '1.25.6'

@sparkfabrik-ai-bot
Copy link
Copy Markdown

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Restore tag fetching before release

The git fetch --force --tags step was removed, but GoReleaser typically requires all
tags to be present to correctly determine the previous release and generate
changelogs. Without fetching tags, GoReleaser may fail or produce incorrect release
notes. Consider keeping the tag-fetching step or ensuring tags are fetched another
way.

.github/workflows/release-please.yml [44-47]

-- name: Run GoReleaser
+- name: Fetch tags
+    if: ${{ steps.release.outputs.release_created }}
+    run: git fetch --force --tags
+
+  - name: Run GoReleaser
     if: ${{ steps.release.outputs.release_created }}
     uses: goreleaser/goreleaser-action@v6
     with:
Suggestion importance[1-10]: 6

__

Why: The removal of the git fetch --force --tags step could cause GoReleaser to fail or produce incorrect release notes if tags are not already available. This is a valid concern, though some GoReleaser setups or checkout configurations may already handle tag fetching automatically.

Low

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant