Skip to content

Commit

Permalink
Merge pull request #1 from OneKeyHQ/fix/desktop
Browse files Browse the repository at this point in the history
feat: add development build in ci job
  • Loading branch information
loatheb authored Nov 24, 2021
2 parents 2a6022c + 6f7f11c commit 9a4c697
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 2 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: build

on: workflow_dispatch

jobs:
build:
runs-on: macos-latest
strategy:
matrix:
node-version: [16.x]

steps:
- name: Checkout Source Code
uses: actions/checkout@v2
with:
lfs: true
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://npm.pkg.github.com'
always-auth: true
scope: '@onekeyhq'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dep
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: 'yarn'

- name: Build Static Linux / Macos / Windows Installer
run: 'cd packages/desktop && yarn build'

- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: onekey-desktop
path: |
./packages/desktop/build-electron/*.dmg
./packages/desktop/build-electron/*.exe
./packages/desktop/build-electron/*.AppImage
16 changes: 14 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Node.js CI
name: lint

on:
pull_request:
Expand All @@ -8,7 +8,7 @@ on:
- onekey

jobs:
build:
lint:
runs-on: ubuntu-latest

strategy:
Expand All @@ -26,6 +26,18 @@ jobs:
registry-url: 'https://npm.pkg.github.com'
always-auth: true
scope: '@onekeyhq'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 9a4c697

Please sign in to comment.