Skip to content
Merged
Show file tree
Hide file tree
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
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build binaries

on:
push:
branches: [main]

jobs:
build:
if: github.repository == 'Allra-Fintech/git-issue'
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
cache: true

- name: Install dependencies
run: go mod download

- name: Run tests
run: make test

- name: Run linter
run: make lint

- name: Build cross-platform binaries
run: make build-all

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: gi-binaries-${{ github.sha }}
path: |
gi-darwin-arm64
gi-darwin-amd64
gi-linux-amd64
retention-days: 7
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
gi
/gi
git-issue-*
*.exe
*.exe~
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ id: "009"
assignee: ""
labels: []
created: 2025-11-14T17:23:12.796868+09:00
updated: 2025-11-14T17:23:12.796868+09:00
updated: 2025-11-14T22:36:02.833639+09:00
---

# Build in CI/CD
Expand Down
5 changes: 5 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ make clean

# Install locally (default ~/.local/bin; override INSTALL_DIR if needed)
make install

# Download latest CI-built binaries (requires repo access):
# 1. git pull origin main
# 2. Go to GitHub → Actions → "Build binaries" workflow
# 3. Download gi-binaries-<sha> artifact for your platform
```

### Makefile Targets
Expand Down
19 changes: 19 additions & 0 deletions cmd/gi/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package main

import (
"fmt"
"os"

"github.com/Allra-Fintech/git-issue/cmd"
)

var version = "dev"

func main() {
cmd.SetVersion(version)

if err := cmd.Execute(); err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)
}
}