61 lines
2.0 KiB
YAML
61 lines
2.0 KiB
YAML
name: Build metamask extension
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- '!**'
|
|
- '.gitea/workflows/triggers/build-metamask-extension'
|
|
- '.gitea/workflows/build-metamask-extension.yml'
|
|
- 'build/build-metamask-extension.sh'
|
|
|
|
jobs:
|
|
test:
|
|
name: "Build metamask extension"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: "Clone project repository"
|
|
uses: actions/checkout@v3
|
|
# At present the stock setup-python action fails on Linux/aarch64
|
|
# Conditional steps below workaroud this by using deadsnakes for that case only
|
|
- name: "Install Python for ARM on Linux"
|
|
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }}
|
|
uses: deadsnakes/action@v3.0.1
|
|
with:
|
|
python-version: '3.8'
|
|
- name: "Install Python cases other than ARM on Linux"
|
|
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.8'
|
|
- name: "Print Python version"
|
|
run: python3 --version
|
|
- name: "Install yarn"
|
|
run: npm install --global yarn
|
|
- name: "Set Gitea access token"
|
|
env:
|
|
TOKEN: ${{ secrets.CICD_REPO_TOKEN }}
|
|
run: |
|
|
git config --global url."https://$TOKEN:@git.vdb.to/".insteadOf https://git.vdb.to/
|
|
- name: "Install stack orchestrator"
|
|
run: ./scripts/install-so.sh
|
|
- name: "Install NodeJS"
|
|
# Project needs Node > 20 while the executor container comes with 18
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
- name: "Run build"
|
|
env:
|
|
INFURA_PROJECT_ID: ${{ secrets.CICD_INFURA_PROJECT_ID }}
|
|
run: |
|
|
# CI must be set false to allow webpack to work
|
|
unset CI
|
|
PATH=$PATH:~/bin
|
|
./build/build-metamask-extension.sh
|
|
- name: "Upload Chrome extension"
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: chrome-extension
|
|
path: ~/stack-orchestrator-test/repo-base-dir/metamask-extension/builds/*chrome*.zip
|