From 9cfb5898c545b11b67539a977295d713e4d72c3c Mon Sep 17 00:00:00 2001 From: Mariusz Kogen Date: Wed, 31 Jan 2024 05:35:26 +0100 Subject: [PATCH 1/2] Add readme, optimize nwc-logo, makefile update, cleaning --- .dockerignore | 11 -------- Makefile | 8 ++++-- README.md | 68 ++++++++++++++++++++++++++++++++++++++++++++- Start9Notes.md | 0 data/empty-dir.txt | 0 nwc-logo.png | Bin 5564 -> 6320 bytes nwc_icon.svg | 11 -------- 7 files changed, 72 insertions(+), 26 deletions(-) delete mode 100644 .dockerignore delete mode 100644 Start9Notes.md delete mode 100644 data/empty-dir.txt delete mode 100644 nwc_icon.svg diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 19d1f91..0000000 --- a/.dockerignore +++ /dev/null @@ -1,11 +0,0 @@ -node_modules/ -default-*.json -default-env.json -.env -.git/ -.github/ -.yo-rc.json -.vscode/ -.DS_Store -scripts.thunder/ -*.s9pk \ No newline at end of file diff --git a/Makefile b/Makefile index 185d0b9..4c9d62a 100644 --- a/Makefile +++ b/Makefile @@ -28,26 +28,28 @@ scripts/embassy.js: $(TS_FILES) deno bundle scripts/embassy.ts scripts/embassy.js arm: + @rm -f docker-images/x86_64.tar ARCH=aarch64 $(MAKE) x86: + @rm -f docker-images/aarch64.tar ARCH=x86_64 $(MAKE) docker-images/aarch64.tar: Dockerfile docker_entrypoint.sh ifeq ($(ARCH),x86_64) else mkdir -p docker-images - docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) --build-arg ARCH=aarch64 --platform=linux/arm64 -o type=docker,dest=docker-images/aarch64.tar . + docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) --platform=linux/arm64 -o type=docker,dest=docker-images/aarch64.tar . endif docker-images/x86_64.tar: Dockerfile docker_entrypoint.sh ifeq ($(ARCH),aarch64) else mkdir -p docker-images - docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) --build-arg ARCH=x86_64 --platform=linux/amd64 -o type=docker,dest=docker-images/x86_64.tar . + docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) --platform=linux/amd64 -o type=docker,dest=docker-images/x86_64.tar . endif -$(PKG_ID).s9pk: manifest.yaml instructions.md nwc_icon.svg LICENSE scripts/embassy.js docker-images/aarch64.tar docker-images/x86_64.tar +$(PKG_ID).s9pk: manifest.yaml instructions.md nwc-logo.png LICENSE scripts/embassy.js docker-images/aarch64.tar docker-images/x86_64.tar ifeq ($(ARCH),aarch64) @echo "start-sdk: Preparing aarch64 package ..." else ifeq ($(ARCH),x86_64) diff --git a/README.md b/README.md index 1f3572d..29b377a 100644 --- a/README.md +++ b/README.md @@ -1 +1,67 @@ -# nostr-wallet-connect-startos +

+ Project Logo +

+ +# Nostr Wallet Connect for StartOS + +[Nostr Wallet Connect](https://nwc.dev/) allows for sustained interaction between Bitcoin lightning wallets and apps. Once an app connection is created, the app can request payments through a Nostr relay. This repository creates the `s9pk` package that is installed to run `Nostr Wallet Connect` on [StartOS](https://github.com/Start9Labs/start-os/). + +## Dependencies + +Prior to building the `nostr-wallet-connect` package, it's essential to configure your build environment for StartOS services. You can find instructions on how to set up the appropriate build environment in the [Developer Docs](https://docs.start9.com/latest/developer-docs/packaging). + +- [docker](https://docs.docker.com/get-docker) +- [docker-buildx](https://docs.docker.com/buildx/working-with-buildx/) +- [deno](https://deno.land/) +- [make](https://www.gnu.org/software/make/) +- [start-sdk](https://github.com/Start9Labs/start-os/tree/sdk/core) +- [yq](https://mikefarah.gitbook.io/yq) + +## Cloning + +Clone the **Nostr Wallet Connect** package repository locally. + +``` +git clone https://github.com/horologger/nostr-wallet-connect-startos.git +cd nostr-wallet-connect-startos +``` + +## Building + +To build the **Nostr Wallet Connect** service as a universal package, run the following command: + +``` +make +``` + +Alternatively the package can be built for individual architectures by specifying the architecture as follows: + +``` +# for amd64 +make x86 +``` +or +``` +# for arm64 +make arm +``` + +## Installing (on StartOS) + +Before installation, define `host: https://server-name.local` in your `~/.embassy/config.yaml` config file then run the following commands to determine successful install: + +> :information_source: Change server-name.local to your Start9 server address + +``` +start-cli auth login +#Enter your StartOS password +make install +``` + +**Tip:** You can also install the `nostr-wallet-connect.s9pk` by sideloading it under the **StartOS > System > Sideload a Service** section. + +## Verify Install + +Go to your StartOS Services page, select **Nostr Wallet Connect** and start the service. + +**Done!** \ No newline at end of file diff --git a/Start9Notes.md b/Start9Notes.md deleted file mode 100644 index e69de29..0000000 diff --git a/data/empty-dir.txt b/data/empty-dir.txt deleted file mode 100644 index e69de29..0000000 diff --git a/nwc-logo.png b/nwc-logo.png index 6fd4686e748913397111b23e17d1267377986ee8..1b1679b6fdd8e4b8a7d546c6cdd2151d6eb34b0b 100644 GIT binary patch literal 6320 zcma)A`9Di`42)20fWK*v9>aIguy^4 z1Yz79&{t=%Y#($(w?E^Afo@r)8tiH<_A9mB3Qb0V{9d&Vt45n$sIXhALeDwIsM6Za zm)m(Rvy*j%QLVMte46o6)j|fh`&4o#SDId|#3)mxm#H#pwCM$Md$qdsDlK+98Y-}m zakG%dF)FqG7w=VT@8-$UD>doG%DYdccAiQ>d3HAjx|)fdhk(1eGCL(|yM>DTKpD5a zay9xBDSEjYyVue}7PtFc8ajbqq_|6xjj*v}ywaqTWOpF8P`f^>y$bc+%%ki=RVWV~ z2$9*V(V-W}Lxk!1ayU(A2x}?h#(ZnI-DqMZi(9KklP+8SDn$>bnXt%cW``Nnkx{P3 zsMOpg9jCvL-_4PxmnbvJ)tR+Ad)50A==sMjq+QwXtnCzCEoI$k84?aEuFQ6Gs8I&q z8iLb{lpt>GUJF{L#9pHTMj8h(r*eyIWh8D(npGW8hyGwk=)yO2@2vg{s92m*12oQKHJUTUz~PS-|Ym=sew zNetq7JK!2%(l}^GMd$8zQ0H{Iy=v#pr-pPS0D$?g4t}uc%=bZ$80$TIRKdn zEeSN2y+%V;yD6*3Vkbu$lECUP+ZWhp#iE!%=I=a_ggk*ZcDGQ00a4063au`^P?1rs z1F3-Mu_*i8EFyOKpzZ$@;)p#5&U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9_9aFHBrjKN1&c`eBLsHfQQi<;W>+`pM9bMc(6#;E7_!JV^iy5H!KF?X9a~Z6->V? zAhA-=zAyabV%hK;+S=r zBrabV-fJt8_-#);Vv>0H9bs+QGDgtsp?WN(sLnbW)LtGd$8{OvEI#)W-MpB(s)323 zd;a+T_=p|jl8(Dya%AC!`4g9vu{?Yw2}$rc9u^QB&zbMMyMno~#$!JcH2l`+)<3)I z0QqvFfal|bLVG&yQ9ozw6l*UudH-0z#@1sOr{+D5SWdP@+t{Z3p>2(qYMR%Jv4@#H uyx(GVxH$h`3?&=r3gmz1IJMsGVGMEt4FA!-jXt7d0X=Oaty&G|=>Gu*F>oaS diff --git a/nwc_icon.svg b/nwc_icon.svg deleted file mode 100644 index 7d66151..0000000 --- a/nwc_icon.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - From 08f84d2d4a9bb237fb14170d10e7b34312c93dd4 Mon Sep 17 00:00:00 2001 From: Mariusz Kogen Date: Wed, 31 Jan 2024 05:37:08 +0100 Subject: [PATCH 2/2] Implement build and release workflows --- .github/workflows/buildService.yml | 37 +++++++++++++++ .github/workflows/releaseService.yml | 71 ++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 .github/workflows/buildService.yml create mode 100644 .github/workflows/releaseService.yml diff --git a/.github/workflows/buildService.yml b/.github/workflows/buildService.yml new file mode 100644 index 0000000..0376b14 --- /dev/null +++ b/.github/workflows/buildService.yml @@ -0,0 +1,37 @@ +name: Build Service + +on: + workflow_dispatch: + pull_request: + paths-ignore: ['*.md'] + branches: ['main', 'master'] + push: + paths-ignore: ['*.md'] + branches: ['main', 'master'] + +jobs: + BuildPackage: + runs-on: ubuntu-latest + steps: + - name: Prepare StartOS SDK + uses: Start9Labs/sdk@v1 + + - name: Checkout services repository + uses: actions/checkout@v3 + + - name: Build the service package + id: build + run: | + git submodule update --init --recursive + start-sdk init + make + PACKAGE_ID=$(yq -oy ".id" manifest.*) + echo "::set-output name=package_id::$PACKAGE_ID" + shell: bash + + - name: Upload .s9pk + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.build.outputs.package_id }}.s9pk + path: ./${{ steps.build.outputs.package_id }}.s9pk + \ No newline at end of file diff --git a/.github/workflows/releaseService.yml b/.github/workflows/releaseService.yml new file mode 100644 index 0000000..427d777 --- /dev/null +++ b/.github/workflows/releaseService.yml @@ -0,0 +1,71 @@ +name: Release Service + +on: + push: + tags: + - 'v*.*' + +jobs: + ReleasePackage: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Prepare StartOS SDK + uses: Start9Labs/sdk@v1 + + - name: Checkout services repository + uses: actions/checkout@v3 + + - name: Build the service package + run: | + git submodule update --init --recursive + start-sdk init + make + + - name: Setting package ID and title from the manifest + id: package + run: | + echo "::set-output name=package_id::$(yq -oy ".id" manifest.*)" + echo "::set-output name=package_title::$(yq -oy ".title" manifest.*)" + shell: bash + + - name: Generate sha256 checksum + run: | + PACKAGE_ID=${{ steps.package.outputs.package_id }} + sha256sum ${PACKAGE_ID}.s9pk > ${PACKAGE_ID}.s9pk.sha256 + shell: bash + + - name: Generate changelog + run: | + PACKAGE_ID=${{ steps.package.outputs.package_id }} + echo "## What's Changed" > change-log.txt + yq -oy '.release-notes' manifest.* >> change-log.txt + echo "## SHA256 Hash" >> change-log.txt + echo '```' >> change-log.txt + sha256sum ${PACKAGE_ID}.s9pk >> change-log.txt + echo '```' >> change-log.txt + shell: bash + + - name: Create GitHub Release + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ github.ref_name }} + name: ${{ steps.package.outputs.package_title }} ${{ github.ref_name }} + prerelease: true + body_path: change-log.txt + files: | + ./${{ steps.package.outputs.package_id }}.s9pk + ./${{ steps.package.outputs.package_id }}.s9pk.sha256 + + - name: Publish to Registry + env: + S9USER: ${{ secrets.S9USER }} + S9PASS: ${{ secrets.S9PASS }} + S9REGISTRY: ${{ secrets.S9REGISTRY }} + run: | + if [[ -z "$S9USER" || -z "$S9PASS" || -z "$S9REGISTRY" ]]; then + echo "Publish skipped: missing registry credentials." + else + start-sdk publish https://$S9USER:$S9PASS@$S9REGISTRY ${{ steps.package.outputs.package_id }}.s9pk + fi