Skip to content

Commit

Permalink
feat: add dev build
Browse files Browse the repository at this point in the history
  • Loading branch information
0xArdi committed Aug 1, 2024
1 parent 98e55a6 commit ab41eed
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,23 @@ jobs:
NODE_ENV: production
DEV_RPC: https://rpc-gate.autonolas.tech/gnosis-rpc/
FORK_URL: https://rpc-gate.autonolas.tech/gnosis-rpc/
run: node build.js
- name: "Build frontend with dev env vars"
run: yarn build:frontend
env:
NODE_ENV: development
DEV_RPC: https://virtual.gnosis.rpc.tenderly.co/78ca845d-2b24-44a6-9ce2-869a979e8b5b
IS_STAGING: ${{ github.ref != 'refs/heads/main' && 'true' || 'false' }}
FORK_URL: https://virtual.gnosis.rpc.tenderly.co/78ca845d-2b24-44a6-9ce2-869a979e8b5b
- name: "Build, notarize, publish dev build"
env:
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLEIDPASS }}
APPLE_ID: ${{ secrets.APPLEID }}
APPLETEAMID: ${{ secrets.APPLETEAMID }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
CSC_LINK: ${{ secrets.CSC_LINK }}
GH_TOKEN: ${{ secrets.github_token}}
NODE_ENV: development
DEV_RPC: https://virtual.gnosis.rpc.tenderly.co/78ca845d-2b24-44a6-9ce2-869a979e8b5b
FORK_URL: https://virtual.gnosis.rpc.tenderly.co/78ca845d-2b24-44a6-9ce2-869a979e8b5b
run: node build.js
12 changes: 11 additions & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ const build = require('electron-builder').build;

const { publishOptions } = require('./electron/constants');

/**
* Get the artifact name for the build based on the environment.
* @returns {string}
*/
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...');

Expand All @@ -14,7 +24,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: {
Expand Down

0 comments on commit ab41eed

Please sign in to comment.