-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
91 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ jobs: | |
tag: ${{ github.ref_name }} | ||
run: | | ||
tmp=$(mktemp) | ||
jq --arg version $tag '.versions |= [$version] + .' installer/versions.json > "$tmp" && mv "$tmp" installer/versions.json | ||
jq --arg version $tag '.versions |= [$version] + .' versions.json > "$tmp" && mv "$tmp" versions.json | ||
git config --global user.name 'Alan Bits' | ||
git config --global user.email '[email protected]' | ||
git commit -am "[CHORE] update version to $tag" | ||
|
@@ -43,16 +43,11 @@ jobs: | |
tag: ${{ github.ref_name }} | ||
run: | | ||
sh build.sh | ||
sh release.sh $tag | ||
- name: Create github release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref_name }} | ||
run: | | ||
gh release create "$tag" --generate-notes ./dist/$tag/manifest.json ./dist/$tag/bootloader.bin \ | ||
./dist/$tag/boot_app0.bin ./dist/$tag/snsd.ino.bin ./dist/$tag/snsd.ino.partitions.bin | ||
pages: | ||
needs: [ release ] | ||
uses: ./.github/workflows/static.yml | ||
gh release create "$tag" --generate-notes ./build/snsd.ino.bootloader.bin \ | ||
./build/snsd.ino.bin ./build/snsd.ino.partitions.bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
#!/bin/sh | ||
git clone https://github.com/lnbits/lnbits.github.io mainpage | ||
cp -r ./mainpage/assets ./installer/main_assets | ||
rm -rf mainpage | ||
PROJECT_NAME=snsd | ||
RELEASE=https://github.com/lnbits/nostr-signing-device/releases/download | ||
INSTALLER_REPO=https://github.com/lnbits/hardware-installer | ||
INSTALLER_PATH=./hardware-installer/public/firmware | ||
|
||
mkdir -p ./installer/firmware/esp32 | ||
git clone $INSTALLER_REPO | ||
|
||
for version in $(jq -r '.versions[]' ./installer/versions.json); do | ||
mkdir -p ./installer/firmware/esp32/$version | ||
wget https://github.com/lnbits/nostr-signing-device/releases/download/$version/manifest.json | ||
mv manifest.json ./installer/firmware/esp32/$version | ||
wget https://github.com/lnbits/nostr-signing-device/releases/download/$version/bootloader.bin | ||
mv bootloader.bin ./installer/firmware/esp32/$version | ||
wget https://github.com/lnbits/nostr-signing-device/releases/download/$version/boot_app0.bin | ||
mv boot_app0.bin ./installer/firmware/esp32/$version | ||
wget https://github.com/lnbits/nostr-signing-device/releases/download/$version/snsd.ino.bin | ||
mv snsd.ino.bin ./installer/firmware/esp32/$version | ||
wget https://github.com/lnbits/nostr-signing-device/releases/download/$version/snsd.ino.partitions.bin | ||
mv snsd.ino.partitions.bin ./installer/firmware/esp32/$version | ||
cp README.md ./hardware-installer/public/README.md | ||
cp versions.json ./hardware-installer/src/versions.json | ||
cp config.js ./hardware-installer/src/config.js | ||
|
||
sed -i "s/%title%/$PROJECT_NAME/g" ./hardware-installer/index.html | ||
|
||
mkdir -p $INSTALLER_PATH | ||
for device in $(jq -r '.devices[]' ./hardware-installer/src/versions.json); do | ||
for version in $(jq -r '.versions[]' ./hardware-installer/src/versions.json); do | ||
mkdir -p $INSTALLER_PATH/$device/$version | ||
wget $RELEASE/$version/$PROJECT_NAME.ino.bin | ||
wget $RELEASE/$version/$PROJECT_NAME.ino.partitions.bin | ||
wget $RELEASE/$version/$PROJECT_NAME.ino.bootloader.bin | ||
mv $PROJECT_NAME.ino.bin $INSTALLER_PATH/$device/$version | ||
mv $PROJECT_NAME.ino.partitions.bin $INSTALLER_PATH/$device/$version | ||
mv $PROJECT_NAME.ino.bootloader.bin $INSTALLER_PATH/$device/$version | ||
done | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
#!/bin/sh | ||
command -v arduino-cli >/dev/null 2>&1 || { echo >&2 "arduino-cli not found. Aborting."; exit 1; } | ||
arduino-cli config --additional-urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json init | ||
arduino-cli core update-index | ||
arduino-cli core install esp32:esp32 | ||
arduino-cli upgrade | ||
arduino-cli lib install ArduinoJson QRCode TFT_eSPI uBitcoin # tiny-AES-c | ||
arduino-cli compile --build-path build --fqbn esp32:esp32:esp32 snsd/snsd.ino | ||
arduino-cli compile --build-path build --fqbn esp32:esp32:ttgo-lora32 snsd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
export const addressesAndFiles = [ | ||
{ | ||
address: "0x1000", | ||
fileName: "snsd.ino.bootloader.bin", | ||
}, | ||
{ | ||
address: "0x8000", | ||
fileName: "snsd.ino.partitions.bin", | ||
}, | ||
{ | ||
address: "0xE000", | ||
fileName: "boot_app0.bin", | ||
}, | ||
{ | ||
address: "0x10000", | ||
fileName: "snsd.ino.bin", | ||
}, | ||
]; | ||
|
||
export const configPath = "elements.json"; | ||
|
||
export const elements = [ | ||
{ | ||
name: "config_ssid", | ||
value: "", | ||
label: "WiFi SSID", | ||
type: "text", | ||
}, | ||
{ | ||
name: "config_password", | ||
value: "", | ||
label: "WiFi password", | ||
type: "text", | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "snsd", | ||
"devices": [ | ||
"esp32" | ||
], | ||
"versions": [ | ||
"v0.0.0" | ||
] | ||
} |