mirror of
https://github.com/RoboSats/robosats-startos.git
synced 2026-01-03 00:29:18 +00:00
37
.github/workflows/buildService.yml
vendored
Normal file
37
.github/workflows/buildService.yml
vendored
Normal file
@ -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@v4
|
||||
|
||||
- name: Build the service package
|
||||
id: build
|
||||
run: |
|
||||
git submodule update --init --recursive
|
||||
start-sdk init
|
||||
make
|
||||
PACKAGE_ID=$(yq -oy ".id" manifest.*)
|
||||
echo "package_id=$PACKAGE_ID" >> $GITHUB_ENV
|
||||
printf "\n SHA256SUM: $(sha256sum ${PACKAGE_ID}.s9pk) \n"
|
||||
shell: bash
|
||||
|
||||
- name: Upload .s9pk
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.package_id }}.s9pk
|
||||
path: ./${{ env.package_id }}.s9pk
|
||||
72
.github/workflows/releaseService.yml
vendored
Normal file
72
.github/workflows/releaseService.yml
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
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@v4
|
||||
|
||||
- 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 "package_id=$(yq -oy ".id" manifest.*)" >> $GITHUB_ENV
|
||||
echo "package_title=$(yq -oy ".title" manifest.*)" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- name: Generate sha256 checksum
|
||||
run: |
|
||||
PACKAGE_ID=${{ env.package_id }}
|
||||
printf "\n SHA256SUM: $(sha256sum ${PACKAGE_ID}.s9pk) \n"
|
||||
sha256sum ${PACKAGE_ID}.s9pk > ${PACKAGE_ID}.s9pk.sha256
|
||||
shell: bash
|
||||
|
||||
- name: Generate changelog
|
||||
run: |
|
||||
PACKAGE_ID=${{ env.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@v2
|
||||
with:
|
||||
tag_name: ${{ github.ref_name }}
|
||||
name: ${{ env.package_title }} ${{ github.ref_name }}
|
||||
prerelease: true
|
||||
body_path: change-log.txt
|
||||
files: |
|
||||
./${{ env.package_id }}.s9pk
|
||||
./${{ env.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 ${{ env.package_id }}.s9pk
|
||||
fi
|
||||
@ -2,10 +2,10 @@ FROM recksato/robosats-client:v0.7.4-alpha
|
||||
RUN apk add bash curl sudo tini wget yq; \
|
||||
rm -f /var/cache/apk/*
|
||||
|
||||
ENV APP_HOST robosats.embassy
|
||||
ENV APP_PORT 12596
|
||||
ENV TOR_PROXY_IP embassy
|
||||
ENV TOR_PROXY_PORT 9050
|
||||
ENV APP_HOST=robosats.embassy
|
||||
ENV APP_PORT=12596
|
||||
ENV TOR_PROXY_IP=embassy
|
||||
ENV TOR_PROXY_PORT=9050
|
||||
|
||||
ADD ./docker_entrypoint.sh /usr/local/bin/docker_entrypoint.sh
|
||||
RUN chmod a+x /usr/local/bin/*.sh
|
||||
|
||||
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 Start9 Labs
|
||||
Copyright (c) 2025 Start9 Labs
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
13
Makefile
13
Makefile
@ -14,13 +14,22 @@ install: $(PKG_ID).s9pk
|
||||
start-cli package install $(PKG_ID).s9pk
|
||||
|
||||
clean:
|
||||
docker run --rm -it -v "$(shell pwd)"/configurator:/home/rust/src messense/rust-musl-cross:x86_64-musl cargo clean -q
|
||||
rm -rf docker-images
|
||||
rm -f image.tar
|
||||
rm -f $(PKG_ID).s9pk
|
||||
rm -f scripts/*.js
|
||||
|
||||
# for rebuilding just the arm image. will include docker-images/x86_64.tar into the s9pk if it exists
|
||||
arm: docker-images/aarch64.tar scripts/embassy.js
|
||||
start-sdk pack
|
||||
|
||||
# for rebuilding just the x86 image. will include docker-images/aarch64.tar into the s9pk if it exists
|
||||
x86: docker-images/x86_64.tar scripts/embassy.js
|
||||
start-sdk pack
|
||||
|
||||
scripts/embassy.js: $(TS_FILES)
|
||||
deno bundle scripts/embassy.ts scripts/embassy.js
|
||||
deno run --allow-read --allow-write --allow-env --allow-net scripts/bundle.ts
|
||||
|
||||
docker-images/x86_64.tar: Dockerfile docker_entrypoint.sh
|
||||
mkdir -p docker-images
|
||||
@ -30,5 +39,5 @@ docker-images/aarch64.tar: Dockerfile docker_entrypoint.sh
|
||||
mkdir -p docker-images
|
||||
docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) --platform=linux/arm64 --build-arg PLATFORM=arm64 -o type=docker,dest=docker-images/aarch64.tar .
|
||||
|
||||
$(PKG_ID).s9pk: manifest.yaml instructions.md LICENSE icon.png scripts/embassy.js docker-images/aarch64.tar docker-images/x86_64.tar
|
||||
$(PKG_ID).s9pk: manifest.yaml instructions.md LICENSE icon.png scripts/embassy.js docker-images/x86_64.tar docker-images/aarch64.tar
|
||||
start-sdk pack
|
||||
|
||||
@ -59,7 +59,7 @@ Now you are ready to build your **robosats** service
|
||||
Clone the project locally.
|
||||
|
||||
```
|
||||
git clone https://github.com/kn0wmad/robosats-wrapper.git
|
||||
git clone https://github.com/Start9Labs/robosats-startos.git
|
||||
cd robosats-wrapper
|
||||
```
|
||||
|
||||
|
||||
@ -4,9 +4,9 @@ version: 0.7.4
|
||||
release-notes: |
|
||||
* Updated to RoboSats v0.7.4-alpha [Release Notes](https://github.com/RoboSats/robosats/releases/tag/v0.7.4-alpha)
|
||||
license: mit
|
||||
wrapper-repo: "https://github.com/RoboSats/robosats-startos"
|
||||
upstream-repo: "https://github.com/Reckless-Satoshi/robosats"
|
||||
support-site: "https://github.com/RoboSats/robosats-startos/issues"
|
||||
wrapper-repo: "https://github.com/Start9Labs/robosats-startos"
|
||||
upstream-repo: "https://github.com/RoboSats/robosats"
|
||||
support-site: "https://github.com/Start9Labs/robosats-startos/issues"
|
||||
marketing-site: "https://learn.robosats.com/"
|
||||
donation-url: "https://learn.robosats.com/contribute/donate/"
|
||||
# The series of commands to build the project into an s9pk for arm64/v8. In this case we are using a Makefile with the simple build command "make".
|
||||
|
||||
3
scripts/bundle.ts
Normal file
3
scripts/bundle.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import { bundle } from "https://deno.land/x/emit@0.40.0/mod.ts";
|
||||
const result = await bundle("scripts/embassy.ts");
|
||||
await Deno.writeTextFile("scripts/embassy.js", result.code);
|
||||
@ -1 +1,2 @@
|
||||
export * from "https://deno.land/x/embassyd_sdk@v0.3.3.0.9/mod.ts";
|
||||
export * from "https://deno.land/x/embassyd_sdk@v0.3.3.0.11/mod.ts";
|
||||
export * from "https://deno.land/x/embassyd_sdk@v0.3.3.0.11/util.ts";
|
||||
|
||||
Reference in New Issue
Block a user