Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/1110 abstract connected wallet operations #1166

Merged
merged 16 commits into from
Nov 19, 2024
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
70 changes: 45 additions & 25 deletions .github/workflows/publish-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
issues: write

jobs:
buf_push:
buf_push_core:
name: Publish to buf.build/onsonr/sonr
runs-on: ubuntu-latest
steps:
Expand All @@ -24,40 +24,60 @@ 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
#
buf_push_thirdparty:
name: Publish to buf.build/onsonr/thirdparty
runs-on: ubuntu-latest
steps:
# Run `git checkout`
- uses: actions/checkout@v3
# Install the `buf` CLI
- uses: bufbuild/buf-setup-action@v1
# Push only the Input in `proto` to the BSR
- uses: bufbuild/buf-push-action@v1
continue-on-error: true
with:
input: third_party/proto
buf_token: ${{ secrets.BUF_TOKEN }}

upload_pkl:
upload_motr_dwn:
runs-on: ubuntu-latest
name: Publish to pkl.sh
name: Publish to configs.sonr.id
steps:
- name: checkout
uses: actions/checkout@v4
- name: Upload to R2

- uses: actions/setup-go@v5
with:
go-version: "1.23"
check-latest: true

- name: Setup go-task / task / taskfile
uses: rnorton5432/setup-task@v1

- name: Build DWN WASM
run: task dwn:build

- name: Upload WASM 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: pkljar
source-dir: pkl
destination-dir: .
r2-bucket: nebula
source-dir: ./build/app.wasm
destination-dir: wasm

- name: Upload SW JS 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: nebula
source-dir: ./pkg/motr/static/sw.js
destination-dir: js

upload_nebula_cdn:
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ deploy/**/data
x/.DS_Store
.aider*
buildenv*
nebula/node_modules
node_modules
cmd/gateway/node_modules
pkg/nebula/node_modules

mprocs.yaml
build
Expand Down
9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -296,19 +296,14 @@ sh-testnet: mod-tidy

.PHONY: templ-gen pkl-gen

assets-gen:
@echo "(assets) Generating gateway cloudflare workers assets"
go run github.com/syumai/workers/cmd/workers-assets-gen -mode=go -o ./cmd/hway/build

templ-gen:
@echo "(templ) Generating templ files"
templ generate

pkl-gen:
@echo "(pkl) Building PKL"
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/DWN.pkl
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/ORM.pkl
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/Txns.pkl
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./third_party/pkl/src/sonr.configs.v1/DWN.pkl
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./third_party/pkl/src/sonr.models.v1/ORM.pkl

###############################################################################
### help ###
Expand Down
58 changes: 51 additions & 7 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,41 @@
version: "3"

vars:
ROOT_DIR:
sh: pwd

tasks:
hway:assets:
internal: true
cmds:
- go run github.com/syumai/workers/cmd/workers-assets-gen -mode=go -o ./cmd/gateway/build

hway:build:
dir: cmd/hway
dir: cmd/gateway
env:
GOOS: js
GOARCH: wasm
cmds:
- task: hway:assets
- go build -o build/app.wasm main.go

hway:dev:
dir: cmd/hway
dir: cmd/gateway
cmds:
- task: nebula:build
- bunx wrangler dev

hway:deploy:
dir: cmd/hway
dir: cmd/gateway
cmds:
- task: nebula:build
- bunx wrangler deploy

motr:build:
dir: internal/dwn
dwn:build:
env:
GOOS: js
GOARCH: wasm
cmds:
- go build -o app.wasm wasm/main.go
- go build -o build/app.wasm ./cmd/dwn/main.go

nebula:build:
dir: pkg/nebula
Expand All @@ -40,3 +44,43 @@ tasks:
- bun run deps.mjs
- bunx tailwindcss -i ./global/styles/globals.css -o ./assets/css/styles.css
- templ generate

# ╭───────────────────────────────────────────────────────────╮
# │ Registration Components │
# ╰───────────────────────────────────────────────────────────╯

buf:push:
cmds:
- task: buf:push:sonr
- task: buf:push:thirdparty

buf:deps:
cmds:
- task: buf:deps:sonr
- task: buf:deps:thirdparty

buf:deps:sonr:
internal: true
dir: proto
cmds:
- buf dep update

buf:deps:thirdparty:
internal: true
dir: third_party/proto
cmds:
- buf dep update

buf:push:sonr:
internal: true
dir: proto
cmds:
- buf build
- buf push

buf:push:thirdparty:
internal: true
dir: third_party/proto
cmds:
- buf build
- buf push
69 changes: 32 additions & 37 deletions api/did/module/v1/module.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading