Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
prnk28 committed Oct 10, 2024
2 parents 5c63034 + 279ab6e commit c17bdeb
Show file tree
Hide file tree
Showing 328 changed files with 9,821 additions and 23,230 deletions.
49 changes: 0 additions & 49 deletions .air.toml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->

## Related Issue(s)

<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if appropriate):
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
3 changes: 3 additions & 0 deletions .github/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
feature: ["feature/*", "feat/*"]
fix: fix/*
chore :hammer:: chore/*
20 changes: 20 additions & 0 deletions .github/workflows/deploy-hway.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Deploy Hway (sonr.id)

on:
push:
branches:
- develop

jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy Sonr.ID on Cloudflare
steps:
- uses: actions/checkout@v4
- name: Install devbox
uses: jetify-com/[email protected]
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_WORKERS_TOKEN }}
workingDirectory: web
19 changes: 19 additions & 0 deletions .github/workflows/label-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: PR Labeler
on:
pull_request:
types: [opened]

permissions:
contents: read

jobs:
pr-labeler:
permissions:
contents: read # for TimonVS/pr-labeler-action to read config file
pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR
runs-on: ubuntu-latest
steps:
- uses: TimonVS/pr-labeler-action@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/pr-labeler.yml # optional, .github/pr-labeler.yml is the default value
19 changes: 19 additions & 0 deletions .github/workflows/publish-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,25 @@ jobs:
input: proto
buf_token: ${{ secrets.BUF_TOKEN }}

#
# upload_configs:
# runs-on: ubuntu-latest
# name: Publish to configs.sonr.id
# steps:
# - name: checkout
# uses: actions/checkout@v4
# - name: Upload to R2
# continue-on-error: true
# uses: ryand56/r2-upload-action@latest
# with:
# r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
# r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
# r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
# r2-bucket: configs
# source-dir: config
# destination-dir: ./pkl
#

upload_pkl:
runs-on: ubuntu-latest
name: Publish to pkl.sh
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Run Tests

on:
push:
branches:
- feature/*

jobs:
test-unit:
runs-on: ubuntu-latest
name: Run Unit Tests
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: onsonr/sonr
fetch-depth: 0
fetch-tags: true

- uses: actions/setup-go@v5
with:
go-version: "1.22"
check-latest: true
- run: make test-unit

test-race:
runs-on: ubuntu-latest
name: Run Race Tests
continue-on-error: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: onsonr/sonr
fetch-depth: 0
fetch-tags: true

- uses: actions/setup-go@v5
with:
go-version: "1.22"
check-latest: true
- run: make test-race

test-cover:
runs-on: ubuntu-latest
name: Run Coverage Tests
continue-on-error: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: onsonr/sonr
fetch-depth: 0
fetch-tags: true

- uses: actions/setup-go@v5
with:
go-version: "1.22"
check-latest: true
- run: make test-cover
2 changes: 2 additions & 0 deletions .github/workflows/scheduled-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
push:
tags:
- v*
branches:
- master

permissions:
contents: write
Expand Down
78 changes: 0 additions & 78 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,6 @@ builds:
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}

- id: hway
goos: [linux, darwin]
goarch: [amd64, arm64]
main: ./cmd/hway
binary: hway
builder: go
gobinary: go
command: build
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}

- id: motr
goos: [js]
goarch: [wasm]
main: ./cmd/motr/motr.go
binary: motr
builder: go
gobinary: go
command: build

archives:
- id: sonr
builds: [sonr]
Expand All @@ -43,14 +23,6 @@ archives:
- src: README*
- src: CHANGELOG*

- id: hway
builds: [hway]
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
format: tar.gz
files:
- src: README*
- src: CHANGELOG*

release:
github:
owner: onsonr
Expand Down Expand Up @@ -82,56 +54,6 @@ brews:
branch: master
token: "{{ .Env.GITHUB_PERSONAL_AUTH_TOKEN }}"

- name: hway
ids: [hway]
commit_author:
name: goreleaserbot
email: [email protected]
directory: Formula
caveats: "Use hway to interact with the Sonr network"
homepage: "https://sonr.io/"
description: "Motr is a proxy for interacting with the Sonr network."
dependencies:
- name: ipfs
repository:
owner: onsonr
name: homebrew-tap
branch: master

# .goreleaser.yaml
dockers:
- # Sonr Binary
id: sonrd
goos: linux
goarch: amd64
ids:
- sonr
image_templates:
- "onsonr/sonrd:latest"
- "onsonr/sonrd:{{ .Tag }}"
dockerfile: "./deploy/sonrd.Dockerfile"
build_flag_templates:
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title=sonrd"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"

- # Motr Binary
id: hway
goos: linux
goarch: amd64
ids:
- hway
image_templates:
- "onsonr/hway:latest"
- "onsonr/hway:{{ .Tag }}"
dockerfile: "./deploy/hway.Dockerfile"
build_flag_templates:
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title=hway"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"

announce:
telegram:
enabled: true
Expand Down
Loading

0 comments on commit c17bdeb

Please sign in to comment.