mirror of
https://github.com/pavlobu/deskreen.git
synced 2025-05-21 01:40:12 -07:00
Merge pull request #29 from pavlobu/fix-build
cache build issues fixed! 🎉
This commit is contained in:
commit
39e284e355
@ -2,34 +2,52 @@ name: build and test
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
# NPMRC_ADMIN_USER_AUTH_TOKEN
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-10.15, windows-2019, ubuntu-18.04]
|
||||
os: [macos-10.15, windows-2019, ubuntu-18.04] # IMPORTANT!!! here ubuntu-18.04 should be same as in codecov and release workflows, this is for making shure cahes used in most efficient way
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v2.3.1
|
||||
uses: actions/checkout@v2.3.4
|
||||
|
||||
- name: install yarn dependencies in app/client using cache
|
||||
uses: bahmutov/npm-install@v1.6.0
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v2.1.4
|
||||
with:
|
||||
working-directory: ./app/client
|
||||
node-version: '12'
|
||||
|
||||
- name: install yarn dependencies in ./ using cache
|
||||
uses: bahmutov/npm-install@v1.6.0
|
||||
with:
|
||||
working-directory: ./
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- name: install yarn dependencies in ./app using cache
|
||||
uses: bahmutov/npm-install@v1.6.0
|
||||
- uses: actions/cache@v2.1.3
|
||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
working-directory: ./app
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ matrix.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ matrix.os }}-yarn-
|
||||
|
||||
- name: yarn install in ./app/client
|
||||
run: |
|
||||
cd ./app/client
|
||||
yarn install
|
||||
|
||||
- name: yarn install in ./
|
||||
run: yarn install
|
||||
|
||||
- name: yarn install in ./app
|
||||
run: |
|
||||
cd ./app
|
||||
yarn install
|
||||
|
||||
- name: yarn build
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: yarn build
|
||||
|
||||
# following step does code signing when `electron-builder --publish always` (look in package.json)
|
||||
- name: yarn package-ci
|
||||
@ -37,11 +55,6 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: yarn package-ci
|
||||
|
||||
- name: yarn build
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: yarn build
|
||||
|
||||
- name: yarn lint
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
45
.github/workflows/codecov.yml
vendored
45
.github/workflows/codecov.yml
vendored
@ -1,29 +1,48 @@
|
||||
name: codecov generate
|
||||
name: codecov
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-18.04 # IMPORTANT!!! this LINUX os should be the same as in build-and-test and release workflows! this is for making shure cahes used in most efficient way
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v2.3.1
|
||||
uses: actions/checkout@v2.3.4
|
||||
|
||||
- name: install yarn dependencies in app/client using cache
|
||||
uses: bahmutov/npm-install@v1.6.0
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v2.1.4
|
||||
with:
|
||||
working-directory: ./app/client
|
||||
node-version: '12'
|
||||
|
||||
- name: install yarn dependencies in ./ using cache
|
||||
uses: bahmutov/npm-install@v1.6.0
|
||||
with:
|
||||
working-directory: ./
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- name: install yarn dependencies in ./app using cache
|
||||
uses: bahmutov/npm-install@v1.6.0
|
||||
- uses: actions/cache@v2.1.3
|
||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
working-directory: ./app
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ubuntu-18.04-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
ubuntu-18.04-yarn-
|
||||
|
||||
- name: yarn install in ./app/client
|
||||
run: |
|
||||
cd ./app/client
|
||||
yarn install
|
||||
|
||||
- name: yarn install in ./
|
||||
run: yarn install
|
||||
|
||||
- name: yarn install in ./app
|
||||
run: |
|
||||
cd ./app
|
||||
yarn install
|
||||
|
||||
- name: yarn build
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: yarn build
|
||||
|
||||
- name: yarn test
|
||||
|
39
.github/workflows/release.yml
vendored
39
.github/workflows/release.yml
vendored
@ -30,7 +30,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-18.04
|
||||
- os: ubuntu-18.04 # IMPORTANT!!! this LINUX os should be the same as in build-and-test and covecov workflows! this is for making shure cahes used in most efficient way
|
||||
artifact_name: 'release/{*.AppImage,*.rpm,*.deb,*.yml}'
|
||||
- os: windows-2019
|
||||
artifact_name: 'release/{*.msi,*.exe,*.blockmap,*.yml}'
|
||||
@ -39,22 +39,37 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2.3.1
|
||||
uses: actions/checkout@v2.3.4
|
||||
|
||||
- name: install yarn dependencies in app/client using cache
|
||||
uses: bahmutov/npm-install@v1.6.0
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v2.1.4
|
||||
with:
|
||||
working-directory: ./app/client
|
||||
node-version: '12'
|
||||
|
||||
- name: install yarn dependencies in ./ using cache
|
||||
uses: bahmutov/npm-install@v1.6.0
|
||||
with:
|
||||
working-directory: ./
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- name: install yarn dependencies in ./app using cache
|
||||
uses: bahmutov/npm-install@v1.6.0
|
||||
- uses: actions/cache@v2.1.3
|
||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
working-directory: ./app
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ matrix.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ matrix.os }}-yarn-
|
||||
|
||||
- name: yarn install in ./app/client
|
||||
run: |
|
||||
cd ./app/client
|
||||
yarn install
|
||||
|
||||
- name: yarn install in ./
|
||||
run: yarn install
|
||||
|
||||
- name: yarn install in ./app
|
||||
run: |
|
||||
cd ./app
|
||||
yarn install
|
||||
|
||||
- name: yarn build
|
||||
env:
|
||||
|
@ -4,7 +4,7 @@
|
||||
"version": "1.0.0",
|
||||
"description": "Deskreen makes any device a second screen for your computer",
|
||||
"scripts": {
|
||||
"build": "yarn build-main && yarn build-renderer && yarn build-client",
|
||||
"build": "yarn build-client && yarn build-main && yarn build-renderer",
|
||||
"build-test": "yarn build-main-test && yarn build-renderer-test && yarn build-client",
|
||||
"build-dll": "cross-env NODE_ENV=development webpack --config ./configs/webpack.config.renderer.dev.dll.babel.js --colors",
|
||||
"build-e2e": "cross-env E2E_BUILD=true yarn build",
|
||||
|
Loading…
x
Reference in New Issue
Block a user