Skip to content

Commit

Permalink
➕ Add turbo
Browse files Browse the repository at this point in the history
  • Loading branch information
cermakjiri committed Nov 15, 2024
1 parent 063327c commit dcbb5ee
Show file tree
Hide file tree
Showing 15 changed files with 334 additions and 234 deletions.
100 changes: 50 additions & 50 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
name: Deploy documentation web

on:
push:
branches: [master]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:
push:
branches: [master]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:

# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4
# We can't use https://github.com/withastro/action as it install dependencies
# at root directory, not the defined sub path
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn

- name: Enable Corepack
run: corepack enable

- name: Install Corepack
run: corepack install

- name: Install
shell: "bash"
run: yarn install --immutable

- name: Build
shell: "bash"
working-directory: ./docs/web
run: yarn build

- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: "./docs/web/dist/"

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4
# We can't use https://github.com/withastro/action as it install dependencies
# at root directory, not the defined sub path
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn

- name: Enable Corepack
run: corepack enable

- name: Install Corepack
run: corepack install

- name: Install
shell: 'bash'
run: yarn install --immutable

- name: Build
shell: 'bash'
working-directory: ./docs/web
run: yarn build

- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: './docs/web/dist/'

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
44 changes: 22 additions & 22 deletions .github/workflows/extension.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
name: Deploy extension

on:
push:
tags:
- "ext-*"
push:
tags:
- 'ext-*'

jobs:
publish-marketplace:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
publish-marketplace:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20

- name: Enable Corepack
run: corepack enable
- name: Enable Corepack
run: corepack enable

- name: Install Corepack
run: corepack install
- name: Install Corepack
run: corepack install

- name: Install
run: yarn install --immutable
working-directory: ./vscode-extension
- name: Install
run: yarn install --immutable
working-directory: ./vscode-extension

- name: Deploy to marketplace
run: yarn deploy
working-directory: ./vscode-extension
env:
VSCE_PAT: ${{ secrets.VSCODE_SECRET }}
- name: Deploy to marketplace
run: yarn deploy
working-directory: ./vscode-extension
env:
VSCE_PAT: ${{ secrets.VSCODE_SECRET }}
68 changes: 34 additions & 34 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,39 @@
name: Release

on:
push:
tags:
- "v*"
push:
tags:
- 'v*'

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Enable Corepack
run: corepack enable

- name: Install Corepack
run: corepack install

- name: Install dependencies
run: yarn install --immutable

- name: Build
run: yarn build

- name: Publish packages
run: yarn publish:ci
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

# - name: Create Github Release
# uses: docker://antonyurchenko/git-release:latest
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# ALLOW_TAG_PREFIX: "true"
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Enable Corepack
run: corepack enable

- name: Install Corepack
run: corepack install

- name: Install dependencies
run: yarn install --immutable

- name: Build
run: yarn build

- name: Publish packages
run: yarn publish:ci
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

# - name: Create Github Release
# uses: docker://antonyurchenko/git-release:latest
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# ALLOW_TAG_PREFIX: "true"
58 changes: 29 additions & 29 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
name: Tests

on:
pull_request:
push:
branches:
- master
pull_request:
push:
branches:
- master

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

strategy:
matrix:
node-version: [20.x]
strategy:
matrix:
node-version: [20.x]

steps:
- name: Checkout project
uses: actions/checkout@v4
steps:
- name: Checkout project
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Enable Corepack
run: corepack enable
- name: Enable Corepack
run: corepack enable

- name: Install Corepack
run: corepack install
- name: Install Corepack
run: corepack install

- name: Install dependencies
run: yarn install --immutable
- name: Install dependencies
run: yarn install --immutable

- name: Build
run: yarn build
- name: Build
run: yarn build

- name: Lint
run: yarn lint
- name: Unit tests
run: yarn test
- name: Lint
run: yarn lint

- name: Unit tests
run: yarn test
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ packages/*/dist
packages/*/lib

.yarn
tsconfig.tsbuildinfo
tsconfig.tsbuildinfo
.turbo
6 changes: 3 additions & 3 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"main": "index.js",
"license": "MIT",
"devDependencies": {
"@lokse/plugin-fallback": "^2.3.1",
"@lokse/plugin-prettier": "^2.3.1",
"lokse": "^2.3.1"
"@lokse/plugin-fallback": "workspace:*",
"@lokse/plugin-prettier": "workspace:*",
"lokse": "workspace:*"
}
}
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
"node": ">=20"
},
"scripts": {
"bootstrap": "lerna bootstrap --use-workspaces",
"build": "lerna run build",
"clean": "lerna exec --ignore example -- rm -r lib",
"changelog": "yarn update-gitmoji-config && npx gitmoji-changelog --preset generic",
"postinstall": "turbo telemetry disable",
"build": "turbo run build",
"clean": "turbo run clean --parallel",
"lint": "eslint packages/*/src/ --ext .ts --config ./.eslintrc",
"format": "prettier --write --config prettier.config.mjs \"packages/*/(src|test)/**/*.(ts|tsx)\"",
"test": "jest",
"test:watch": "jest --watchAll",
"changelog": "yarn update-gitmoji-config && npx gitmoji-changelog --preset generic",
"publish:ci": "lerna publish from-package --yes",
"release": "lerna version $1",
"version": "yarn changelog && code --wait CHANGELOG.md && git add CHANGELOG.md .gitmoji-changelogrc",
"test": "jest",
"test:watch": "jest --watchAll",
"update-gitmoji-config": "node ./scripts/update-gitmoji-config.js"
},
"devDependencies": {
Expand All @@ -35,6 +35,7 @@
"husky": "^4.3.0",
"lint-staged": "^10.5.1",
"prettier": "3.3.3",
"turbo": "^2.3.0",
"typescript": "5.6.3"
},
"dependencies": {
Expand Down
Loading

0 comments on commit dcbb5ee

Please sign in to comment.