-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from qlrd/win32-builtin-openssl
Win32 builtin openssl
- Loading branch information
Showing
6 changed files
with
74 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
push: | ||
branches: | ||
- main | ||
- win32-builtin-openssl | ||
pull_request: | ||
branches: | ||
- main | ||
|
@@ -18,6 +19,53 @@ jobs: | |
- name: Checkout Git repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup output variables helpers | ||
id: setup | ||
shell: pwsh | ||
run: | | ||
$loc = Get-Location | ||
$version = "v22.08.2" | ||
$zipname = "krux-$version.zip" | ||
$signame = "krux-$version.zip.sig" | ||
$pemname = "selfcustody.pem" | ||
$extraResources = "$loc\extraResources" | ||
$release_url = "https://github.com/selfcustody/krux/releases/download" | ||
$raw_url = "https://raw.githubusercontent.com/selfcustody/krux/main" | ||
echo "zip=$loc\$zipname" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append | ||
echo "sig=$loc\$signame" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append | ||
echo "pem=$loc\$pemname" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append | ||
echo "extraResources=$extraResources" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append | ||
echo "openssl_build_dir=$loc\openssl" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append | ||
echo "release_zip=$release_url/$version/$zipname" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append | ||
echo "release_sig=$release_url/$version/$signame" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append | ||
echo "release_pem=$raw_url/$pemname" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append | ||
echo "prefix=$extraResources\OpenSSL" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append | ||
echo "openssldir=$extraResources\OpenSSL\CommonFiles" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append | ||
- name: Create extraResources directory | ||
shell: pwsh | ||
run: mkdir ${{ steps.setup.outputs.extraResources }} | ||
|
||
- name: Configure, build, test and install openssl | ||
uses: qlrd/[email protected] | ||
with: | ||
build-type: 'plain' | ||
version: openssl-3.0.7 | ||
prefix: ${{ steps.setup.outputs.prefix }} | ||
openssldir: ${{ steps.setup.outputs.openssldir }} | ||
|
||
- name: Download krux binaries and signature file before pre-test | ||
shell: pwsh | ||
run: | | ||
curl.exe -L ${{ steps.setup.outputs.release_zip }} -o ${{ steps.setup.outputs.zip }} | ||
curl.exe -L ${{ steps.setup.outputs.release_sig }} -o ${{ steps.setup.outputs.sig }} | ||
curl.exe -L -H "Accept-Charset: utf-8" ${{ steps.setup.outputs.release_pem }} -o ${{ steps.setup.outputs.pem }} | ||
Get-Content -Path ${{ steps.setup.outputs.pem }} | ||
- name: Pre-test builtin openssl with krux binaries and signature files | ||
shell: cmd | ||
run: ${{ steps.setup.outputs.prefix }}\bin\openssl.exe sha256 <${{ steps.setup.outputs.zip }} -binary | ${{ steps.setup.outputs.prefix }}\bin\openssl.exe pkeyutl -verify -pubin -inkey ${{ steps.setup.outputs.pem }} -sigfile ${{ steps.setup.outputs.sig }} | ||
|
||
- name: Setup node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
|
@@ -29,10 +77,8 @@ jobs: | |
yarn run platform-install | ||
- name: Make icons | ||
run: | | ||
yarn run icon | ||
rm ./build/*.svg | ||
rm ./build/*.png | ||
shell: pwsh | ||
run: yarn run icon | ||
|
||
- name: Get version from package.json | ||
uses: polyseam/[email protected] | ||
|
@@ -43,8 +89,7 @@ jobs: | |
- name: Build KruxInstaller | ||
env: | ||
GH_TOKEN: ${{ secrets.github_token }} | ||
run: | | ||
yarn run build nsis | ||
run: yarn run build nsis | ||
|
||
- name: Hash executable | ||
uses: qlrd/[email protected] | ||
|
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
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,6 +1,6 @@ | ||
{ | ||
"name": "krux-installer", | ||
"version": "0.0.1-alpha-2", | ||
"version": "0.0.1-alpha-3", | ||
"author": "qlrd <[email protected]>", | ||
"description": "GUI installer of Krux´s firmware to use Kendryte K210 hardwares as Bitcoin Signature Device", | ||
"scripts": { | ||
|
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,8 +1,8 @@ | ||
const { defineConfig } = require('@vue/cli-service') | ||
const path = require('path') | ||
const replace = require('replace') | ||
const fs = require('fs') | ||
const pkg = require('./package.json') | ||
const { defineConfig } = require('@vue/cli-service'); | ||
const path = require('path'); | ||
const replace = require('replace'); | ||
const fs = require('fs'); | ||
const pkg = require('./package.json'); | ||
|
||
module.exports = defineConfig({ | ||
configureWebpack: { | ||
|
@@ -29,7 +29,11 @@ module.exports = defineConfig({ | |
}, | ||
files: [ | ||
'!**/{README.md,.github,.browserslistrc,.eslintrc.js,vue.config.js,jsconfig.js,babel.config.js,yarn.lock}', | ||
'!./bin/{electron-serve.js}' | ||
'!**/bin/{krux-installer.js}', | ||
'!**/build/{krux.txt}', | ||
], | ||
extraResources: [ | ||
"./extraResources" | ||
], | ||
// See | ||
// 'Can't load fonts in production build, [email protected]' | ||
|
@@ -50,4 +54,4 @@ module.exports = defineConfig({ | |
} | ||
} | ||
} | ||
}) | ||
}); |