Skip to content

Commit

Permalink
Merge ae5c09e into b1a77e3
Browse files Browse the repository at this point in the history
  • Loading branch information
Alorel committed May 4, 2021
2 parents b1a77e3 + ae5c09e commit 57d9844
Show file tree
Hide file tree
Showing 12 changed files with 17,476 additions and 47,484 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Expand Up @@ -17,7 +17,6 @@
*.nycrc text
*.toml text
*.pug text
yarn.lock text
*.md text
*.scss text
*.sass text
Expand Down
147 changes: 86 additions & 61 deletions .github/workflows/core.yml
Expand Up @@ -5,42 +5,51 @@ on:

jobs:
lint:
name: Lint
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
node:
- 14.x
- 14
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
name: Set up node
with:
node-version: ${{ matrix.node }}
registry-url: https://npm.pkg.github.com/alorel
- name: Set up yarn
run: npm install -g yarn@^2.0.0-rc.27
registry-url: https://npm.pkg.github.com
- name: Get NPM cache dir
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache NPM
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-npm-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-${{ matrix.node }}-
- name: Install NPM^7.11
run: npm install -g npm@^7.11.2 --no-fund --no-audit
# - name: Output NPM version
# id: npm-version
# run: |
# echo "::set-output name=version::$(npm -v)"
# - name: Install NPM7
# if: ${{ !startsWith(npm-version.version, '7' }}
# run: npm install -g npm@^7.7.6
- name: Install deps
run: yarn install --immutable
run: npm ci --no-fund
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Lint
run: yarn run lint
run: npm run lint
test:
runs-on: ${{ matrix.os }}
name: Test ${{ matrix.os }}/Node ${{ matrix.node }}
strategy:
fail-fast: false
matrix:
Expand All @@ -49,43 +58,50 @@ jobs:
# - macos-latest
- ubuntu-latest
node:
- 14.x
- 12.x
- 15
- 14
- 12
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
name: Set up node
with:
node-version: ${{ matrix.node }}
registry-url: https://npm.pkg.github.com/alorel
- name: Set up yarn
run: npm install -g yarn@^2.0.0-rc.27
registry-url: https://npm.pkg.github.com
- name: Get NPM cache dir
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache NPM
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-npm-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-${{ matrix.node }}-
- name: Install NPM^7.11
run: npm install -g npm@^7.11.2 --no-fund --no-audit
# - name: Output NPM version
# id: npm-version
# run: |
# echo "::set-output name=version::$(npm -v)"
# - name: Install NPM7
# if: ${{ !startsWith(npm-version.version, '7' }}
# run: npm install -g npm@^7.7.6
- name: Install deps
run: yarn install --immutable
run: npm ci --no-fund
env:
YARN_ENABLE_GLOBAL_CACHE: 'false'
YARN_NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Test
run: yarn run test --forbid-only --forbid-pending
run: npm run test -- --forbid-only --forbid-pending
- name: Upload coverage
if: ${{ matrix.os != 'windows-latest' }}
continue-on-error: true
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: node-${{ matrix.node }}-on-${{ matrix.os }}
flag-name: node-${{ matrix.node }}-on-${{ matrix.os }}-${{ github.event_name }}
parallel: true
posttest:
runs-on: ubuntu-latest
Expand All @@ -98,8 +114,9 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
release:
name: Release
runs-on: ${{ matrix.os }}
if: ${{ github.ref == 'refs/heads/master' }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
needs:
- lint
- test
Expand All @@ -108,35 +125,43 @@ jobs:
os:
- ubuntu-latest
node:
- 14.x
- 14
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 100
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- uses: actions/setup-node@v1
fetch-depth: 1000
- uses: actions/setup-node@v2
name: Set up node
with:
node-version: ${{ matrix.node }}
registry-url: https://npm.pkg.github.com/alorel
- name: Set up yarn
run: npm install -g yarn@^2.0.0-rc.27
registry-url: https://npm.pkg.github.com
- name: Get NPM cache dir
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache NPM
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-npm-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-${{ matrix.node }}-
- name: Install NPM^7.11
run: npm install -g npm@^7.11.2 --no-fund --no-audit
# - name: Output NPM version
# id: npm-version
# run: |
# echo "::set-output name=version::$(npm -v)"
# - name: Install NPM7
# if: ${{ !startsWith(npm-version.version, '7' }}
# run: npm install -g npm@^7.7.6
- name: Install deps
run: yarn install --immutable
run: npm ci --no-fund
env:
YARN_ENABLE_GLOBAL_CACHE: 'false'
YARN_NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
run: yarn run release
run: npm run release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .npmrc
@@ -0,0 +1 @@
@alorel:registry=https://npm.pkg.github.com
8 changes: 4 additions & 4 deletions .releaserc.js
Expand Up @@ -17,20 +17,20 @@ module.exports = {
prepare: [
'@semantic-release/changelog',
NPM,
exec('yarn run sync-pkg'),
exec('yarn run doctoc'),
exec('npm run sync-pkg'),
exec('npm run doctoc'),
{
assets: [
'CHANGELOG.md',
'README.md',
'package.json',
'yarn.lock',
'package-lock.json',
...projectNames.flatMap(n => [`projects/${n}/package.json`, `projects/${n}.README.md`])
],
message: 'chore(release): ${nextRelease.version}',
path: '@semantic-release/git'
},
exec('yarn run rollup')
exec('npm run rollup')
],
publish: [
...projectNames.map(p => exec(`bash -c "cd dist/${p} && npm publish"`)),
Expand Down
3 changes: 0 additions & 3 deletions .yarn/.gitignore

This file was deleted.

0 comments on commit 57d9844

Please sign in to comment.