github-workflows

Initialize or update GitHub Actions workflows for Go projects with comprehensive CI/CD pipelines including linting, testing, coverage, snapshot builds, and releases. Use when setting up GitHub Actions automation for Go projects. Trigger with "setup github actions", "add github workflows", or "configure ci/cd".

16 stars

Best use case

github-workflows is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Initialize or update GitHub Actions workflows for Go projects with comprehensive CI/CD pipelines including linting, testing, coverage, snapshot builds, and releases. Use when setting up GitHub Actions automation for Go projects. Trigger with "setup github actions", "add github workflows", or "configure ci/cd".

Teams using github-workflows should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/github-workflows/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/tools/github-workflows/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/github-workflows/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How github-workflows Compares

Feature / Agentgithub-workflowsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Initialize or update GitHub Actions workflows for Go projects with comprehensive CI/CD pipelines including linting, testing, coverage, snapshot builds, and releases. Use when setting up GitHub Actions automation for Go projects. Trigger with "setup github actions", "add github workflows", or "configure ci/cd".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# GitHub Workflows Setup Skill

Automate Go project CI/CD with production-ready GitHub Actions workflows for testing, linting, coverage reporting, and releases.

## Overview

This skill provides a complete GitHub Actions CI/CD setup for Go projects:

- **Linting**: Automated code quality checks with golangci-lint
- **Coverage**: Test coverage reporting with badge generation
- **Snapshot**: Test release builds on every push
- **Release**: Automated releases with GoReleaser on tag push
- **Dependabot**: Automated dependency updates
- **Funding**: GitHub Sponsors configuration

All workflows integrate with [Task](https://taskfile.dev) for consistent build commands.

## Prerequisites

1. **GitHub repository**: Project hosted on GitHub
2. **Go module**: Project uses Go modules (`go.mod` present)
3. **Task runner** (recommended): Taskfile.yml for build commands
   - Install: `brew install go-task/tap/go-task`
   - Docs: https://taskfile.dev
4. **GoReleaser config** (for releases): `.goreleaser.yml` in repository root
5. **GitHub Container Registry**: Enabled for Docker image publishing

## Workflow Architecture

| Workflow | Trigger | Purpose | Permissions |
|----------|---------|---------|-------------|
| **linter.yml** | Every push | Code quality validation | `contents: read` |
| **snapshot.yml** | Every push | Test release process | `contents: read` |
| **coverage.yml** | Push to main | Generate coverage badge | `contents: write` |
| **release.yml** | Push tags | Production release | `contents: write`, `packages: write` |

Workflow files are located in `assets/workflows/` directory.

## Quick Start

### Step 1: Copy Workflow Files

```bash
# Create directories
mkdir -p .github/workflows

# Copy workflows from assets
cp assets/workflows/*.yml .github/workflows/

# Copy configurations
cp assets/dependabot.yml .github/dependabot.yml
cp assets/FUNDING.yml .github/FUNDING.yml
```

### Step 2: Configure Taskfile (Recommended)

Create or update `Taskfile.yml`:

```yaml
version: '3'

tasks:
  linter:
    desc: Run golangci-lint
    cmds:
      - golangci-lint run ./...

  test:
    desc: Run tests
    cmds:
      - go test -v ./...

  snapshot:
    desc: Create snapshot build (test release)
    cmds:
      - goreleaser release --snapshot --clean --skip=publish

  release:
    desc: Create production release
    cmds:
      - goreleaser release --clean
```

### Step 3: Customize Go Version

Update Go version in all workflows:

```yaml
- uses: actions/setup-go@v6
  with:
    go-version: '1.24'  # CUSTOMIZE: Use your Go version
```

### Step 4: Customize Coverage Settings

In `.github/workflows/coverage.yml`:

```yaml
- name: Generate coverage badge
  with:
    limit-coverage: "70"  # CUSTOMIZE: Set your coverage threshold
```

### Step 5: Update Funding Configuration

Update `.github/FUNDING.yml`:

```yaml
github: [YOUR_GITHUB_USERNAME]  # CUSTOMIZE
```

### Step 6: Configure GitHub Settings

Enable required GitHub features:

**Actions Permissions**:
- Settings → Actions → General
- Set "Workflow permissions" to "Read and write permissions"

**GitHub Container Registry**:
- Settings → Packages
- Enable "Inherit access from repository"

**Branch Protection** (optional):
- Settings → Branches → Add rule
- Require status checks: `linter`, `goreleaser-snapshot`

**Secrets** (if needed):
- Settings → Secrets → Actions
- Add `HOMEBREW_TAP_TOKEN` (if using Homebrew in GoReleaser)

### Step 7: Test Workflows

```bash
# 1. Push changes to trigger linter and snapshot
git add .github/
git commit -m "ci: add GitHub Actions workflows"
git push origin main

# 2. Check workflow runs at: https://github.com/OWNER/REPO/actions

# 3. Test release workflow (without publishing)
git tag -a v0.1.0-test -m "Test release"
git push origin v0.1.0-test

# 4. If successful, create real release
git tag -a v1.0.0 -m "First release"
git push origin v1.0.0
```

## Status Badges (Optional)

Add workflow badges to README.md:

```markdown
[![Linter](https://github.com/OWNER/REPO/actions/workflows/linter.yml/badge.svg)](https://github.com/OWNER/REPO/actions/workflows/linter.yml)
[![Release](https://github.com/OWNER/REPO/actions/workflows/release.yml/badge.svg)](https://github.com/OWNER/REPO/actions/workflows/release.yml)
![Coverage](https://raw.githubusercontent.com/OWNER/REPO/main/coverage-badge.svg)
```

## Expected Output

After using this skill, your repository will have:
- ✓ Complete CI/CD pipeline with 4 workflows
- ✓ Automated linting on every push
- ✓ Snapshot builds to validate releases
- ✓ Coverage badges showing test coverage
- ✓ Automated releases on Git tags
- ✓ Dependabot for dependency updates
- ✓ GitHub Sponsors configuration
- ✓ Production-ready workflow structure

Your project will have professional-grade CI/CD matching industry best practices.

## Additional Documentation

- **Detailed configurations and customization**: See [REFERENCE.md](REFERENCE.md)
- **Troubleshooting common issues**: See [TROUBLESHOOTING.md](TROUBLESHOOTING.md)
- **Workflow templates**: Available in `assets/workflows/` directory

## Resources

- **GitHub Actions**: https://docs.github.com/en/actions
- **Task Runner**: https://taskfile.dev
- **golangci-lint**: https://golangci-lint.run
- **GoReleaser**: https://goreleaser.com
- **Dependabot**: https://docs.github.com/en/code-security/dependabot

Related Skills

@gw-git-worktree-workflows

16
from diegosouzapw/awesome-omni-skill

Master Git worktrees and gw-tools workflows for parallel development. Use this skill when creating worktrees, managing multiple branches simultaneously, navigating between worktrees, troubleshooting worktree issues, or setting up feature branch workflows. Triggers on tasks involving git worktree commands, branch isolation, parallel development, or gw CLI usage.

github.com/n-r-w/ctxlog guidelines

16
from diegosouzapw/awesome-omni-skill

Guidelines and examples for using the ctxlog logging package.

github-search

16
from diegosouzapw/awesome-omni-skill

Search GitHub for repos, code, and usage examples using gh CLI. Capabilities: repo discovery, code search, finding library usage patterns, issue/PR search. Actions: search, find, discover repos/code/examples. Keywords: gh, github, search repos, search code, find examples, how to use library, stars, language filter. Use when: finding repositories, searching code patterns, discovering how libraries are used, exploring open source.

github-repo-skill

16
from diegosouzapw/awesome-omni-skill

Guide for creating new GitHub repos and best practice for existing GitHub repos, applicable to both code and non-code projects

github-repo-analysis

16
from diegosouzapw/awesome-omni-skill

Analyze GitHub repositories to extract insights about commit frequency, outstanding contributors, release timeline, and project health metrics. Use when users request repository analysis, commit history investigation, contributor identification, release tracking, or development activity assessment for any GitHub project.

github-pr-review-comments

16
from diegosouzapw/awesome-omni-skill

Comprehensive workflow for managing GitHub PR review comments using gh CLI and GraphQL API. Use when asked to address review comments, find unreplied comments, reply to review threads, or resolve/unresolve review conversations. Supports finding ALL comments across pagination boundaries, replying to threads, and resolving conversations.

github-navigator

16
from diegosouzapw/awesome-omni-skill

GitHub operations via gh CLI. CRITICAL: Always use instead of WebFetch for ANY github.com URL. Use when user provides GitHub URL, says 'facebook/react', 'show README', 'list issues', 'check PR', 'clone repo', 'analyze this repo', 'understand the architecture', 'how is X structured', 'explore the codebase'. For deep analysis of external repos, clones locally.

github-issues

16
from diegosouzapw/awesome-omni-skill

Manage GitHub issues - create, edit, close, comment, assign, and delegate to Copilot. Uses GitHub MCP.

github-issue-triage

16
from diegosouzapw/awesome-omni-skill

Analyze GitHub issues for the Nx repository and provide assignment recommendations based on technology stack, team expertise, and priority classification rules.

github-issue-resolver

16
from diegosouzapw/awesome-omni-skill

Strategically resolves GitHub Actions failures, failed pull requests, and Dependabot issues using the gh CLI with intelligent analysis and automated fixes.

github-issue-creator

16
from diegosouzapw/awesome-omni-skill

Creates well-structured GitHub issues for the MCPSpy project using the gh CLI tool. Use when asked to create issues, report bugs, or document features. Follows conventional naming with feat/chore/fix prefixes and maintains appropriate detail levels.

github-copilot-agent-tips-and-tricks

16
from diegosouzapw/awesome-omni-skill

Tips and Tricks for Working with GitHub Copilot Agent PRs