From 66dbbabdb808004e36b3c5edd1de9b68ee741e5d Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Fri, 30 Aug 2024 14:35:05 +0300 Subject: [PATCH] win release updates --- .github/workflows/release_win.yml | 9 ++++++++- Makefile | 7 ++----- build-win.js | 15 +++++++++++++-- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release_win.yml b/.github/workflows/release_win.yml index 8c2739a6..b77deb16 100644 --- a/.github/workflows/release_win.yml +++ b/.github/workflows/release_win.yml @@ -4,7 +4,13 @@ name: Release for Windows # git tag vX.Y.Z # git push origin tag vX.Y.Z -on: [pull_request] +# on: [pull_request] + + +on: + push: + tags: + - 'v*.*.*-win' jobs: build-windows: @@ -48,6 +54,7 @@ jobs: DEV_RPC: https://rpc-gate.autonolas.tech/gnosis-rpc/ IS_STAGING: ${{ github.ref != 'refs/heads/main' && 'true' || 'false' }} FORK_URL: https://rpc-gate.autonolas.tech/gnosis-rpc/ + GH_TOKEN: ${{ secrets.github_token}} run: | echo NODE_ENV=$NODE_ENV >> prod.env echo DEV_RPC=$DEV_RPC >> prod.env diff --git a/Makefile b/Makefile index 1afb3411..91c3d2ef 100644 --- a/Makefile +++ b/Makefile @@ -18,19 +18,16 @@ endef pwd -./dist/tendermint_win.exe: ./operate +./dist/tendermint_win.exe: ./operate/ pwd poetry install && poetry run pyinstaller operate/services/utils/tendermint.py --onefile --name tendermint_win -./dist/pearl_win.exe: ./dist/aea_win.exe ./dist/tendermint_win.exe +./dist/pearl_win.exe: ./operate/ ./dist/aea_win.exe ./dist/tendermint_win.exe pwd poetry install && poetry run pyinstaller --collect-data eth_account --collect-all aea --collect-all coincurve --collect-all autonomy --collect-all operate --collect-all aea_ledger_ethereum --collect-all aea_ledger_cosmos --collect-all aea_ledger_ethereum_flashbots --hidden-import aea_ledger_ethereum --hidden-import aea_ledger_cosmos --hidden-import aea_ledger_ethereum_flashbots operate/pearl.py --add-binary dist/aea_win.exe:. --add-binary dist/tendermint_win.exe:. --onefile --name pearl_win -.PHONY: operate -operate: ./dist/pearl_win.exe - .PHONY: build build: ./dist/pearl_win.exe $(call setup_env, prod) diff --git a/build-win.js b/build-win.js index 7bf8db3e..9427337c 100644 --- a/build-win.js +++ b/build-win.js @@ -6,6 +6,13 @@ const build = require('electron-builder').build; const { publishOptions } = require('./electron/constants'); + +function artifactName() { + const env = process.env.NODE_ENV; + const prefix = env === 'production' ? '' : 'dev-'; + return prefix + '${productName}-${version}-${platform}-${arch}.${ext}'; +} + const main = async () => { console.log('Building...'); @@ -14,7 +21,7 @@ const main = async () => { publish: 'onTag', config: { appId: 'xyz.valory.olas-operate-app', - artifactName: '${productName}-${version}-${platform}-${arch}.${ext}', + artifactName: artifactName(), productName: 'Pearl', files: ['electron/**/*', 'package.json'], directories: { @@ -23,6 +30,10 @@ const main = async () => { nsis: { oneClick: false, }, + win: { + publish: publishOptions, + icon: 'electron/assets/icons/splash-robot-head-dock.png', + }, extraResources: [ { from: 'electron/bins', @@ -30,7 +41,7 @@ const main = async () => { filter: ['**/*'], }, ], - + }, }); };