diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0eade5ffb..78dc854d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 \ No newline at end of file diff --git a/build.js b/build.js index a7e15a32b..8570e3bdd 100644 --- a/build.js +++ b/build.js @@ -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...'); @@ -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: {