Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into Ahmed/tx-export-on…
Browse files Browse the repository at this point in the history
…-demand

# Conflicts:
#	packages/yoroi-extension/app/api/ada/lib/storage/bridge/traitUtils.js
#	packages/yoroi-extension/app/stores/toplevel/TransactionsStore.js
  • Loading branch information
vsubhuman committed Aug 21, 2023
2 parents 9411020 + 3519c02 commit 496b4d4
Show file tree
Hide file tree
Showing 596 changed files with 31,443 additions and 45,147 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/jira.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Lint branch name and add jira task

on:
push:
branches:
- develop
pull_request:
types: [opened, synchronize, reopened]

jobs:
# A script to ensure that the PR branch name is named following the new naming
# conventions `<tag>/<jira-ticket>/<short-summary>` and to make a comment with
# the Jira ticket associated with the open PR
# Script: https://github.com/AhmedIbrahim336/jira-ticket
jira:
runs-on: ubuntu-latest
steps:
- run: curl ${{ secrets.JIRA_TICKET_API }}${{ github.event.number }}
93 changes: 57 additions & 36 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,80 @@
name: Publish to Nightly

on:
push:
branches:
- nightly
- 'release/**'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.3.1
with:
path: packages/yoroi-extension

- name: Check if version has been updated
id: check
uses: EndBug/version-check@v2
with:
diff-search: true
file-name: ./packages/yoroi-extension/package.json

- name: Read .nvmrc
if: steps.check.outputs.changed == 'true'
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm

- name: Setup node
if: steps.check.outputs.changed == 'true'
uses: actions/setup-node@v1
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-yoroi-extension-node-modules
with:
# https://github.com/actions/cache/blob/main/examples.md#node---npm
# It is recommended to cache the NPM cache (~/.npm) instead of node_modules.
# But we put node version into the cache key and cache node_modules.
path: packages/yoroi-extension/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-node-${{ steps.nvm.outputs.NVMRC }}-${{ hashFiles('packages/yoroi-extension/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: npm install
if: steps.check.outputs.changed == 'true'
run: |
cd packages/yoroi-extension
npm install
npm i
npm i --prefix packages/yoroi-extension
npm i --prefix packages/yoroi-connector
- name: Build
if: steps.check.outputs.changed == 'true'
run: |
cd packages/yoroi-extension
npm run prod:nightly
env:
YOROI_NIGHTLY_PEM: ${{ secrets.YOROI_NIGHTLY_PEM }}
- name: publish nightly
uses: SebastienGllmt/chrome-addon@v3
- name: Install Octopus CLI
if: steps.check.outputs.changed == 'true'
uses: OctopusDeploy/install-octopus-cli-action@v1.1.8
with:
# ID of the extension that you are updating
extension: poonlenmfdfbjfeeballhiibknlknepo
# Path to a .zip of your addon
zip: "packages/yoroi-extension/Yoroi Nightly.zip"
# TODO: only share with trusted testers for now
publishTarget: trustedTesters
# Google OAuth2
client-id: ${{ secrets.CHROME_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
version: latest

- name: Move package file
if: steps.check.outputs.changed == 'true'
run: mv "packages/yoroi-extension/Yoroi Nightly.zip" yoroi-frontend.${{ steps.check.outputs.version }}.zip

- name: Push package to Octopus Deploy
if: steps.check.outputs.changed == 'true'
uses: OctopusDeploy/push-package-action@v1.0.1
with:
packages: 'yoroi-frontend.${{ steps.check.outputs.version }}.zip'
server: https://emurgo.octopus.app
api_key: ${{ secrets.OCTOPUS_API_KEY }}

- name: Create release
if: steps.check.outputs.changed == 'true'
uses: OctopusDeploy/create-release-action@v1.1.3
with:
server: https://emurgo.octopus.app
api_key: ${{ secrets.OCTOPUS_API_KEY }}
project: 'yoroi-frontend'
channel: 'Nightly'
packages: 'yoroi-frontend:${{ steps.check.outputs.version }}'
release_number: '${{ steps.check.outputs.version }}'


62 changes: 62 additions & 0 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.3.1
with:
path: packages/yoroi-extension

- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- name: npm install
run: |
npm i
npm i --prefix packages/yoroi-extension
npm i --prefix packages/yoroi-connector
- name: Build
run: |
cd packages/yoroi-extension
npm run keygen && mv key.pem production-key.pem && npm run prod:stable
- name: Install Octopus CLI
uses: OctopusDeploy/install-octopus-cli-action@v1.1.8
with:
version: latest

- name: Move package file
run: mv "packages/yoroi-extension/Yoroi.zip" yoroi-frontend.${{ steps.package-version.outputs.current-version}}-production.zip

- name: Push package to Octopus Deploy
uses: OctopusDeploy/push-package-action@v1.0.1
with:
packages: 'yoroi-frontend.${{ steps.package-version.outputs.current-version}}-production.zip'
server: https://emurgo.octopus.app
api_key: ${{ secrets.OCTOPUS_API_KEY }}

- name: Create release
uses: OctopusDeploy/create-release-action@v1.1.3
with:
server: https://emurgo.octopus.app
api_key: ${{ secrets.OCTOPUS_API_KEY }}
project: 'yoroi-frontend'
channel: 'Production'
packages: 'yoroi-frontend:${{ steps.package-version.outputs.current-version}}-production'
release_number: '${{ steps.package-version.outputs.current-version}}-production'
26 changes: 26 additions & 0 deletions .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: SonarQube Checks

on:
# Trigger analysis when pushing to your main branches, and when creating a pull request.
push:
branches:
- main
- master
- develop
- 'releases/**'
pull_request:
types: [opened, synchronize, reopened]

jobs:
sonarqube:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
Loading

0 comments on commit 496b4d4

Please sign in to comment.