Skip to content

Commit

Permalink
chore: use workspace, update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
deleonio committed Sep 12, 2023
1 parent 0137067 commit 4230a3f
Show file tree
Hide file tree
Showing 99 changed files with 22,194 additions and 112,714 deletions.
38 changes: 31 additions & 7 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,41 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js

# - uses: pnpm/action-setup@v2.2.4
# with:
# run_install: false
# version: 7
# - uses: actions/setup-node@v3
# with:
# cache: pnpm
# node-version: 20

# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
scope: '@leanup'
# cache: pnpm
node-version: 20
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store # -${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store
- name: Install
run: npm ci
- name: Build
Expand Down
64 changes: 41 additions & 23 deletions .github/workflows/publish-to-npmjs.dry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

# https://unix.stackexchange.com/questions/112023/how-can-i-replace-a-string-in-a-files
- name: Replace alias in all package.json's
run: |
Expand All @@ -31,58 +32,75 @@ jobs:
find packages -name "*.svelte" -type f -exec sed -i -e "s/@leanup/@${{env.alias}}/g" {} +
find packages -name "*.vue" -type f -exec sed -i -e "s/@leanup/@${{env.alias}}/g" {} +
git diff
- name: Set up Node.js
# - uses: pnpm/action-setup@v2.2.4
# with:
# run_install: false
# version: 7
# - uses: actions/setup-node@v3
# with:
# cache: pnpm
# node-version: 20

# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '14.x'
# cache: pnpm
node-version: 20
registry-url: '${{env.registry}}'
scope: '@${{env.alias}}'
- name: Install and publish only @${{env.alias}}/stack
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
npm install
npm publish --access=${{env.access}} --tag=${{env.tag}} || true
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store # -${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store
- name: Install and publish only @${{env.alias}}/stack
run: npm publish --access=${{env.access}} --tag=${{env.tag}} || true
working-directory: packages/stack/core
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Install and publish only @${{env.alias}}/stack-snowpack
run: |
npm install
npm publish --access=${{env.access}} --tag=${{env.tag}} || true
run: npm publish --access=${{env.access}} --tag=${{env.tag}} || true
working-directory: packages/stack/snowpack
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Install and publish only @${{env.alias}}/stack-vite
run: |
npm install
npm publish --access=${{env.access}} --tag=${{env.tag}} || true
run: npm publish --access=${{env.access}} --tag=${{env.tag}} || true
working-directory: packages/stack/vite
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Install and publish only @${{env.alias}}/stack-webpack
run: |
npm install
npm publish --access=${{env.access}} --tag=${{env.tag}} || true
run: npm publish --access=${{env.access}} --tag=${{env.tag}} || true
working-directory: packages/stack/webpack
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Install and publish only @${{env.alias}}/lib
run: |
npm install
npm publish --access=${{env.access}} --tag=${{env.tag}} || true
run: npm publish --access=${{env.access}} --tag=${{env.tag}} || true
working-directory: packages/lib
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Install and publish only @${{env.alias}}/cli-core-babel
run: |
npm install
npm publish --access=${{env.access}} --tag=${{env.tag}} || true
run: npm publish --access=${{env.access}} --tag=${{env.tag}} || true
working-directory: packages/cli/core/babel
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Install and publish only @${{env.alias}}/cli
run: |
npm install
npm publish --access=${{env.access}} --access=public --tag=${{env.tag}} || true
run: npm publish --access=${{env.access}} --access=public --tag=${{env.tag}} || true
working-directory: packages/cli/core
env:
NODE_AUTH_TOKEN: ${{env.token}}
Expand Down
3 changes: 2 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"packages": [
"packages/**"
],
"version": "1.3.45"
"useNx": true,
"version": "1.3.46"
}
15 changes: 15 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "test"]
}
}
},
"targetDefaults": {
"build": {
"dependsOn": ["^build"]
}
}
}
Loading

0 comments on commit 4230a3f

Please sign in to comment.