Skip to content

Commit

Permalink
+ Release v0.2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
zealic committed May 2, 2020
1 parent 80248a5 commit b00ee88
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: CI

on: [push]
on:
push:
branches:
- master

jobs:
tests:
Expand Down
109 changes: 109 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Release

on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"

jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [12.x, 14.x]
steps:
- name: checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
build-release:
runs-on: ubuntu-latest
needs: tests
steps:
- name: checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- run: npm install
- run: make package && make dist
- shell: bash
id: release_description
run: |
description=$(cat ./.dist/checksum.sha256)
echo $description
description="${description//'%'/'%25'}"
description="${description//$'\n'/'%0A'}"
description="${description//$'\r'/'%0D'}"
echo "::set-output name=description::$description"
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
${{ steps.release_description.outputs.description }}
draft: false
prerelease: false
- name: Upload Release Assets - Linux
id: upload-release-asset-linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./.dist/vanitygen-hd_linux-amd64.tar.gz
asset_name: vanitygen-hd_linux-amd64.tar.gz
asset_content_type: application/tar+gzip
- name: Upload Release Assets - Darwin
id: upload-release-asset-darwin
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./.dist/vanitygen-hd_darwin-amd64.tar.gz
asset_name: vanitygen-hd_darwin-amd64.tar.gz
asset_content_type: application/tar+gzip
- name: Upload Release Assets - Windows
id: upload-release-asset-windows
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./.dist/vanitygen-hd_windows-amd64.zip
asset_name: vanitygen-hd_windows-amd64.zip
asset_content_type: application/zip
- name: Upload Release Assets - Checksum
id: upload-release-asset-checksum
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./.dist/checksum.sha256
asset_name: checksum.sha256
asset_content_type: text/plain
docker-image:
needs: build-release
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: docker-build-push
uses: docker/build-push-action@v1
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: ${{ github.repository }}
tag_with_ref: true
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ package: clean
@tsc
@./node_modules/.bin/pkg -target=$(PACKAGE_TARGETS) --out-path=$(DIST_DIR) $(TARGET_DIR)/$(REPO_NAME).js
@(set -e; cd $(DIST_DIR); \
chmod +x $(REPO_NAME)-*; \
mv $(REPO_NAME)-linux $(REPO_NAME)_linux-amd64; \
mv $(REPO_NAME)-macos $(REPO_NAME)_darwin-amd64; \
mv $(REPO_NAME)-win.exe $(REPO_NAME)_windows-amd64.exe; \
sha256sum $(REPO_NAME)_* > checksum.sha256; \
)

dist:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vanitygen-hd",
"version": "0.1.0",
"version": "0.2.0",
"description": "",
"main": "vanitygen-hd.ts",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion vanitygen-hd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { HD } from './src';

function initializeProgram() {
let program = new Command();
program.version("0.1.0");
program.version("0.2.0");
program.command("generate")
.option("-b, --bits <int>", "BIP32 specifies the entropy length to be tween 128 and 256 bits and a multiple of 32 bits.", Number, 256)
.option("-w, --workers <int>", "Numeber of parallel worker, use 0 as CPU num.", parseInt, 0)
Expand Down

0 comments on commit b00ee88

Please sign in to comment.