Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
chore: update build (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain authored Jan 5, 2022
1 parent 3ce2e3a commit 254431d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 160 deletions.
172 changes: 13 additions & 159 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: actions/cache@v2
id: cache
env:
CACHE_NAME: cache-node-modules
with:
path: |
~/.npm
./dist
./node_modules
./packages/*/dist
./packages/*/node_modules
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install
npm run --if-present build
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present lint
- run: npm run --if-present dep-check

Expand All @@ -49,23 +33,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- uses: actions/cache@v2
id: cache
env:
CACHE_NAME: cache-node-modules
with:
path: |
~/.npm
./dist
./node_modules
./packages/*/dist
./packages/*/node_modules
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install
npm run --if-present build
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:node
- uses: codecov/codecov-action@v1

Expand All @@ -77,23 +45,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: actions/cache@v2
id: cache
env:
CACHE_NAME: cache-node-modules
with:
path: |
~/.npm
./dist
./node_modules
./packages/*/dist
./packages/*/node_modules
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install
npm run --if-present build
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:chrome

test-chrome-webworker:
Expand All @@ -104,23 +56,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: actions/cache@v2
id: cache
env:
CACHE_NAME: cache-node-modules
with:
path: |
~/.npm
./dist
./node_modules
./packages/*/dist
./packages/*/node_modules
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install
npm run --if-present build
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:chrome-webworker

test-firefox:
Expand All @@ -131,23 +67,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: actions/cache@v2
id: cache
env:
CACHE_NAME: cache-node-modules
with:
path: |
~/.npm
./dist
./node_modules
./packages/*/dist
./packages/*/node_modules
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install
npm run --if-present build
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:firefox

test-firefox-webworker:
Expand All @@ -158,23 +78,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: actions/cache@v2
id: cache
env:
CACHE_NAME: cache-node-modules
with:
path: |
~/.npm
./dist
./node_modules
./packages/*/dist
./packages/*/node_modules
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install
npm run --if-present build
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:firefox-webworker

test-electron-main:
Expand All @@ -185,23 +89,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: actions/cache@v2
id: cache
env:
CACHE_NAME: cache-node-modules
with:
path: |
~/.npm
./dist
./node_modules
./packages/*/dist
./packages/*/node_modules
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install
npm run --if-present build
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npx xvfb-maybe npm run --if-present test:electron-main

test-electron-renderer:
Expand All @@ -212,23 +100,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: actions/cache@v2
id: cache
env:
CACHE_NAME: cache-node-modules
with:
path: |
~/.npm
./dist
./node_modules
./packages/*/dist
./packages/*/node_modules
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install
npm run --if-present build
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npx xvfb-maybe npm run --if-present test:electron-renderer

release:
Expand All @@ -242,30 +114,12 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: actions/cache@v2
id: cache
env:
CACHE_NAME: cache-node-modules
- uses: ipfs/aegir/actions/cache-node-modules@master
- uses: ipfs/aegir/actions/docker-login@master
with:
path: |
~/.npm
./dist
./node_modules
./packages/*/dist
./packages/*/node_modules
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install
npm run --if-present build
- run: |
if [[ -n "${DOCKER_TOKEN}" ]] && [[ -n "${DOCKER_USERNAME}" ]]; then
echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin
fi
npm run --if-present release
docker-token: ${{ secrets.DOCKER_USERNAME }}
docker-username: ${{ secrets.DOCKER_USERNAME }}
- run: npm run --if-present release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"build": "lerna run build",
"lint": "lerna run lint",
"dep-check": "lerna run dep-check",
"release": "semantic-release -e semantic-release-monorepo"
"release": "lerna exec --concurrency 1 -- semantic-release -e semantic-release-monorepo"
},
"bugs": "https://github.com/libp2p/js-libp2p-interfaces/issues",
"homepage": "https://github.com/libp2p/js-libp2p-interfaces#readme",
Expand Down

0 comments on commit 254431d

Please sign in to comment.