Skip to content

Commit

Permalink
chore: revert build app action (#1369)
Browse files Browse the repository at this point in the history
  • Loading branch information
pczeglik-iohk authored Aug 14, 2024
1 parent 22fa7d6 commit 6250aea
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/actions/build/app/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: buildapp
description: Build app

inputs:
DIR:
description: 'app directory'
required: true
NAME:
description: 'app name'
required: true
LACE_EXTENSION_KEY:
description: 'Public extended manifest key'
required: true
BUILD_DEV_PREVIEW:
description: 'Build developer preview of Lace'
required: false
default: 'false'
POSTHOG_PRODUCTION_TOKEN_MAINNET:
description: 'Post hog production mainnet token'
required: false
default: ''
POSTHOG_PRODUCTION_TOKEN_PREPROD:
description: 'Post hog production preprod token'
required: false
default: ''
POSTHOG_PRODUCTION_TOKEN_PREVIEW:
description: 'Post hog production preview token'
required: false
default: ''
PRODUCTION_MODE_TRACKING:
description: 'Enable analytics tracking in production'
required: false
default: 'false'
BANXA_LACE_URL:
description: 'Banxa`s integration URL'
required: false
default: 'https://lacewallet.banxa-sandbox.com/'

runs:
using: 'composite'

steps:
- name: Code check
uses: ./.github/actions/check
with:
DIR: ${{ inputs.DIR }}

- name: Build ${{ inputs.NAME }}
run: yarn build
shell: bash
working-directory: ${{ inputs.DIR }}
env:
LACE_EXTENSION_KEY: ${{ inputs.LACE_EXTENSION_KEY }}
BUILD_DEV_PREVIEW: ${{ inputs.BUILD_DEV_PREVIEW }}
POSTHOG_PRODUCTION_TOKEN_MAINNET: ${{ inputs.POSTHOG_PRODUCTION_TOKEN_MAINNET }}
POSTHOG_PRODUCTION_TOKEN_PREPROD: ${{ inputs.POSTHOG_PRODUCTION_TOKEN_PREPROD }}
POSTHOG_PRODUCTION_TOKEN_PREVIEW: ${{ inputs.POSTHOG_PRODUCTION_TOKEN_PREVIEW }}
PRODUCTION_MODE_TRACKING: ${{ inputs.PRODUCTION_MODE_TRACKING }}
BANXA_LACE_URL: ${{ inputs.BANXA_LACE_URL }}

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.NAME }}
path: ${{ inputs.DIR }}/dist
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,68 @@ jobs:
- name: Execute unit tests
uses: ./.github/actions/test/unit

release-pkg:
name: Release package
runs-on: ubuntu-20.04
needs: prepare

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js and install dependencies
uses: ./.github/actions/install
with:
WALLET_PASSWORD: ${{ secrets.WALLET_PASSWORD_TESTNET }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Download packages-common
uses: actions/download-artifact@v4
with:
name: packages-common
path: packages/common/dist

- name: Download packages-cardano
uses: actions/download-artifact@v4
with:
name: packages-cardano
path: packages/cardano/dist

- name: Download packages-translation
uses: actions/download-artifact@v4
with:
name: packages-translation
path: packages/translation/dist

- name: Download packages-core
uses: actions/download-artifact@v4
with:
name: packages-core
path: packages/core/dist

- name: Download packages-staking
uses: actions/download-artifact@v4
with:
name: packages-staking
path: packages/staking/dist

- name: Collect Workflow Telemetry Smoke Tests
uses: catchpoint/workflow-telemetry-action@v2
with:
comment_on_pr: false

- name: Build Lace browser extension
uses: ./.github/actions/build/app
with:
DIR: apps/browser-extension-wallet
NAME: lace-browser-extension
LACE_EXTENSION_KEY: ${{ secrets.MANIFEST_PUBLIC_KEY }}
POSTHOG_PRODUCTION_TOKEN_MAINNET: ${{ startsWith(github.ref, 'refs/heads/release') && secrets.POSTHOG_PRODUCTION_TOKEN_MAINNET || '' }}
POSTHOG_PRODUCTION_TOKEN_PREPROD: ${{ startsWith(github.ref, 'refs/heads/release') && secrets.POSTHOG_PRODUCTION_TOKEN_PREPROD || '' }}
POSTHOG_PRODUCTION_TOKEN_PREVIEW: ${{ startsWith(github.ref, 'refs/heads/release') && secrets.POSTHOG_PRODUCTION_TOKEN_PREVIEW || '' }}
PRODUCTION_MODE_TRACKING: ${{ startsWith(github.ref, 'refs/heads/release') && 'true' || 'false' }}
BANXA_LACE_URL: ${{ startsWith(github.ref, 'refs/heads/release') && 'https://lacewallet.banxa.com/' }}

build:
name: Build Lace
runs-on: ubuntu-22.04
Expand Down

0 comments on commit 6250aea

Please sign in to comment.