Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
---

**Describe the bug** A clear and concise description of what the bug is.

**To Reproduce** Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior** A clear and concise description of what you expected to
happen.

**Screenshots** If applicable, add screenshots to help explain your problem.

**Environment (please complete the following information):**

- OS: [e.g. macOS, Linux, Windows]
- Go Version: [e.g. 1.25]
- SDK Version: [e.g. v1.0.0]

**Additional context** Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: ""
assignees: ""
---

**Is your feature request related to a problem? Please describe.** A clear and
concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like** A clear and concise description of what you
want to happen.

**Describe alternatives you've considered** A clear and concise description of
any alternative solutions or features you've considered.

**Additional context** Add any other context or screenshots about the feature
request here.
18 changes: 18 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!--
Thanks for opening a PR! Your contribution is much appreciated.
In order to make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Tests added
- [ ] Documentation added
77 changes: 77 additions & 0 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Development

on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened

permissions:
contents: read
pull-requests: write

jobs:
test:
name: "Unit Tests"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: "☁️ Checkout repository"
uses: actions/checkout@v4

- name: "🔧 Setup Go"
uses: actions/setup-go@v5
with:
go-version: '1.25'
cache: true

- name: "📦 Download dependencies"
run: go mod download

- name: "🔍 Run tests with coverage"
run: make test-cover

lint:
name: "Lint Code"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: "☁️ Checkout repository"
uses: actions/checkout@v4

- name: "🔧 Setup Go"
uses: actions/setup-go@v5
with:
go-version: '1.25'
cache: true

- name: "📦 Download dependencies"
run: go mod download

- name: "🔍 Check code formatting"
run: make fmt-check

- name: "🔍 Run linter"
run: make lint

build:
name: "Build Check"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: "☁️ Checkout repository"
uses: actions/checkout@v4

- name: "🔧 Setup Go"
uses: actions/setup-go@v5
with:
go-version: '1.25'
cache: true

- name: "📦 Download dependencies"
run: go mod download

- name: "🔨 Build all packages"
run: make build
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Release

on:
pull_request:
types: [closed]
branches: [main]

permissions:
contents: write

jobs:
auto-release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: "☁️ Checkout repository"
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "🔍 Extract version from branch name"
id: extract-version
run: ./scripts/extract-version.sh "${{ github.event.pull_request.head.ref }}"

- name: "🔧 Setup Go"
if: steps.extract-version.outputs.should_release == 'true'
uses: actions/setup-go@v5
with:
go-version: '1.25'
cache: true

- name: "📦 Download dependencies"
if: steps.extract-version.outputs.should_release == 'true'
run: go mod download

- name: "🔍 Run tests before release"
if: steps.extract-version.outputs.should_release == 'true'
run: make test-cover

- name: "🏷️ Create and push tag"
if: steps.extract-version.outputs.should_release == 'true'
run: |
VERSION="${{ steps.extract-version.outputs.version }}"
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -a "$VERSION" -m "Release $VERSION"
git push origin "$VERSION"
echo "Created and pushed tag: $VERSION"

- name: "🚀 Run GoReleaser"
if: steps.extract-version.outputs.should_release == 'true'
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41 changes: 41 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool
*.out
coverage.out

# Go workspace file
go.work

# Dependency directories
vendor/

# IDE specific files
.idea/
.vscode/
*.swp
*.swo
*~

# OS specific files
.DS_Store
Thumbs.db

# Ripple specific
ripple_events.json
test_*.json
error_events.json

# Playground binaries
playground/client
playground/server
# Added by goreleaser init:
dist/
104 changes: 104 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# GoReleaser configuration for Ripple Go SDK
# Documentation: https://goreleaser.com

version: 2

project_name: ripple-go

before:
hooks:
- go mod tidy
- go test ./...
- go vet ./...

# Since this is a library, we don't need to build binaries
# Instead, we'll focus on source code releases
builds:
- skip: true

archives:
- formats: ["tar.gz"]
format_overrides:
- goos: windows
formats: ["zip"]
name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
files:
- README.md
- ONBOARDING.md
- LICENSE*
- CHANGELOG*
- "*.go"
- "go.mod"
- "go.sum"
- "adapters/**"
- "playground/**"
- "examples/**"

changelog:
sort: asc
use: github
filters:
exclude:
- "^docs:"
- "^test:"
- "^ci:"
- "^chore:"
- "^style:"
groups:
- title: Features
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 0
- title: Bug Fixes
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 1
- title: Performance Improvements
regexp: '^.*?perf(\([[:word:]]+\))??!?:.+$'
order: 2
- title: Others
order: 999

release:
github:
owner: Tap30
name: ripple-go
draft: false
prerelease: auto
mode: replace
header: |
## Ripple Go SDK {{ .Tag }}

A fast, resilient, and scalable event-tracking SDK built in Go.

### Installation

```bash
go get github.com/Tap30/ripple-go@{{ .Tag }}
```
footer: |
## Full Changelog

**Full Changelog**: https://github.com/Tap30/ripple-go/compare/{{ .PreviousTag }}...{{ .Tag }}

---

Released by [GoReleaser](https://github.com/goreleaser/goreleaser) 🚀

# Generate checksums for release assets
checksum:
name_template: 'checksums.txt'

# Create source code archives
source:
enabled: true
name_template: '{{ .ProjectName }}_{{ .Version }}_source'
format: tar.gz

# Announce releases
announce:
skip: '{{gt .Patch 0}}'
Loading
Loading