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

v.1.4.6 Bug fixes and service node min/max #193

Merged
merged 18 commits into from Sep 22, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 18 additions & 9 deletions .github/workflows/build.yml
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master
- development

jobs:
build:
Expand All @@ -16,28 +17,36 @@ jobs:
- name: Checkout git repo
uses: actions/checkout@v1

# Read node version from `.nvmrc` file
- name: Read nvm rc
id: nvmrc
uses: browniebroke/read-nvmrc-action@v1

- name: Install node
uses: actions/setup-node@v1
with:
node-version: "11.9.0"
node-version: ${{ steps.nvmrc.outputs.node_version }}

- name: Install dependencies
run: npm install

- name: Download lokid binaries
run: node ./build/download-binaries.js
run: ./download-asset.sh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OS: ${{ runner.os }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
working-directory: ./downloads

- name: Extract zip binaries
if: runner.os != 'Linux'
run: unzip latest.zip
run: unzip latest
shell: bash
working-directory: ./downloads

- name: Extract xz binaries
if: runner.os == 'Linux'
run: tar -xf latest.xz
run: tar -xf latest
shell: bash
working-directory: ./downloads

Expand All @@ -51,15 +60,15 @@ jobs:
run: ls ./bin
shell: bash

- name: Publish window and linux binaries
- name: Build window and linux binaries
if: runner.os != 'macOS'
run: npm run release
run: npm run build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish mac binaries
- name: Build mac binaries
if: runner.os == 'macOS'
run: npm run release
run: npm run build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_LINK: ${{ secrets.MAC_CERTIFICATE }}
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,77 @@
name: Loki Electron Wallet Release

on:
push:
branches:
- master

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- name: Checkout git repo
uses: actions/checkout@v1

# Read node version from `.nvmrc` file
- name: Read nvm rc
id: nvmrc
uses: browniebroke/read-nvmrc-action@v1

- name: Install node
uses: actions/setup-node@v1
with:
node-version: ${{ steps.nvmrc.outputs.node_version }}

- name: Install dependencies
run: npm install

- name: Download lokid binaries
run: ./download-asset.sh
env:
OS: ${{ runner.os }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
working-directory: ./downloads

- name: Extract zip binaries
if: runner.os != 'Linux'
run: unzip latest.zip
shell: bash
working-directory: ./downloads

- name: Extract xz binaries
if: runner.os == 'Linux'
run: tar -xf latest.xz
shell: bash
working-directory: ./downloads

- name: Move lokid binaries
run: |
find ./downloads -type f -name "lokid*" -exec cp '{}' ./bin \;
find ./downloads -type f -name "loki-wallet-rpc*" -exec cp '{}' ./bin \;
shell: bash

- name: Verify binaries
run: ls ./bin
shell: bash

- name: Publish window and linux binaries
if: runner.os != 'macOS'
run: npm run release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish mac binaries
if: runner.os == 'macOS'
run: npm run release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_LINK: ${{ secrets.MAC_CERTIFICATE }}
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}
SIGNING_APPLE_ID: ${{ secrets.SIGNING_APPLE_ID }}
SIGNING_APP_PASSWORD: ${{ secrets.SIGNING_APP_PASSWORD }}
SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }}
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -28,6 +28,7 @@ bin/*

.env

/downloads
downloads/*
!downloads/*.sh

dev-app-update.yml
2 changes: 1 addition & 1 deletion .nvmrc
@@ -1 +1 @@
11.9.0
14.11.0
6 changes: 1 addition & 5 deletions .prettierrc.js
@@ -1,5 +1 @@
// Must be included inside .stylintrc, otherwise will conflict and cause weird
// linting errors
module.exports = {
printWidth: 120
};
// intentionally blank
1 change: 0 additions & 1 deletion .stylintrc
Expand Up @@ -32,5 +32,4 @@
"valid": true,
"zeroUnits": "never",
"zIndexNormalize": false,
"printWidth": 120
}
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -23,10 +23,10 @@ Please submit any changes as pull requests to the development branch, all change
#### Commands

```
nvm use 11.9.0
npm install -g quasar-cli
nvm use 14.11.0
npm install -g @quasar/cli
git clone https://github.com/loki-project/loki-electron-gui-wallet
cd loki-electron-wallet
cd loki-electron-gui-wallet
cp path_to_lokid_binaries/lokid bin/
cp path_to_lokid_binaries/loki-wallet-rpc bin/
npm install
Expand Down
54 changes: 0 additions & 54 deletions build/download-binaries.js

This file was deleted.

40 changes: 40 additions & 0 deletions downloads/download-asset.sh
@@ -0,0 +1,40 @@
#!/bin/bash
# Source from: https://github.com/houqp/download-release-assets-action

set -e

if [ -z "$OS" ]; then
echo "OS must be set"
exit 1
fi

if [ -z "$RENAME" ]; then
RENAME="latest"
fi

REPO="loki-project/loki-core"
RELEASE="latest"

if [ "$OS" == "Linux" ]; then
FILE_NAME_REGEX="linux"
elif [ "$OS" == "Windows" ]; then
FILE_NAME_REGEX="win"
elif [ "$OS" == "macOS" ]; then
FILE_NAME_REGEX="osx"
else
echo "OS must be Linux, Windows or macOS"
exit 1
fi


ASSET_URL=$(curl -sL --fail \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
"https://api.github.com/repos/${REPO}/releases/${RELEASE}" \
| jq -r ".assets | .[] | select(.name | test(\"${FILE_NAME_REGEX}\")) | .url")

curl -sL --fail \
-H "Accept: application/octet-stream" \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
-o "${RENAME}" \
"$ASSET_URL"