-
Notifications
You must be signed in to change notification settings - Fork 89
ci: transition to monorepo #6988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
03356e4
cfc4bae
7839784
f0a11a6
9c0bce2
a76af37
b65f499
fa132f6
cfe3a40
03ea940
bb99ed4
c6401f1
d0b69d1
e128d89
ec01c99
7af410b
5f1f03d
e234662
059f419
184627b
afd9d7a
ccdf7bf
95d7740
aaeb6d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| name: Deploy Latest | ||
| on: | ||
| push: | ||
| branches: [master] | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| jobs: | ||
| release-please: | ||
| runs-on: ubuntu-20.04 | ||
| steps: | ||
| - uses: google-github-actions/release-please-action@v3 | ||
| id: release | ||
| with: | ||
| command: manifest | ||
| token: ${{ secrets.ADMIN_TOKEN }} | ||
| default-branch: master | ||
| extra-files: | | ||
| packages/calcite-components/readme.md | ||
| - name: Checkout Repository | ||
| if: ${{ steps.release.outputs.releases_created }} | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| token: ${{ secrets.ADMIN_TOKEN }} | ||
| ref: release-please | ||
| - name: Setup Node | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: 16 | ||
| registry-url: "https://registry.npmjs.org" | ||
| - name: Build Packages | ||
| if: ${{ steps.release.outputs.releases_created }} | ||
| run: | | ||
| npm install | ||
| npm run build | ||
| - name: Publish to NPM | ||
| if: ${{ steps.release.outputs.releases_created }} | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
| run: npm run publish:latest |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| on: | ||
| push: | ||
| branches: | ||
| - release-please--branches--master | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| name: clean-changelog | ||
| jobs: | ||
| clean-changelog: | ||
| runs-on: ubuntu-20.04 | ||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| token: ${{ secrets.ADMIN_TOKEN }} | ||
| fetch-depth: 0 | ||
| - name: Setup Node | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: 16 | ||
| - name: Remove Next Changelog Entries | ||
| run: | | ||
| npm install | ||
| npm run util:remove-next-changelog-entries | ||
| - name: Push Changes | ||
| run: | | ||
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
| git config --global user.name "github-actions[bot]" | ||
| git commit -am "docs: remove prerelease changelog entries" || true | ||
| git push origin ${{ github.ref_name }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,40 @@ | ||
| # Directories | ||
| dist/ | ||
| www/ | ||
| hydrate/ | ||
| node_modules/ | ||
| docs/ | ||
|
|
||
| # Compiled files | ||
| src/**/components.d.ts | ||
| src/**/*.js | ||
| __docs-temp__/* | ||
|
|
||
| # User Settings, Caches & Temp Files | ||
| *~ | ||
| *.sw[mnpcod] | ||
| *.log | ||
| $RECYCLE.BIN/ | ||
| *.bak | ||
| *.d.ts | ||
| *.lock | ||
| *.tmp | ||
| *.tmp.* | ||
| *.log | ||
| *.orig | ||
| *.pem | ||
| *.sublime-project | ||
| *.sublime-workspace | ||
| *.bak | ||
| *.orig | ||
| .stencil/ | ||
| *.sw[mnpcod] | ||
| *.tmp | ||
| *.tmp.* | ||
| *_BACKUP_* | ||
| *_BASE_* | ||
| *_LOCAL_* | ||
| *_REMOTE_* | ||
| *~ | ||
| .*cache* | ||
| .DS_Store | ||
| .DS_Store | ||
| .Spotlight-V100 | ||
| .Trashes | ||
| ._* | ||
| .env | ||
| .idea/ | ||
| .sass-cache/ | ||
| .stencil/ | ||
| .turbo | ||
| .versions/ | ||
| .DS_Store | ||
| .env | ||
| $RECYCLE.BIN/ | ||
| Dockerfile | ||
| Thumbs.db | ||
| UserInterfaceState.xcuserstate | ||
| Dockerfile | ||
| dist/ | ||
| ehthumbs.db | ||
| log.txt | ||
| src/components.d.ts | ||
| src/components/icon/assets | ||
| src/components/*/assets/*/t9n/index.d.ts | ||
| logs | ||
| node_modules/ | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| #!/bin/sh | ||
| #!/usr/bin/env sh | ||
| . "$(dirname "$0")/_/husky.sh" | ||
|
|
||
| npx lint-staged |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,14 @@ | ||
| #!/bin/bash | ||
| #!/usr/bin/env bash | ||
| # from https://riptutorial.com/git/example/16164/pre-push | ||
|
|
||
| protected_branch="master" | ||
| current_branch=$(git rev-parse --abbrev-ref HEAD) | ||
|
|
||
| if [ "$protected_branch" = "$current_branch" ] && bash -c ': >/dev/tty' | ||
| then | ||
| read -p "You're about to push master, is that what you intended? [y|n] " -n 1 -r < /dev/tty | ||
| if [ "$protected_branch" = "$current_branch" ] && bash -c ': >/dev/tty'; then | ||
| read -p "You're about to push main, is that what you intended? [y|n] " -n 1 -r </dev/tty | ||
| echo | ||
| if echo "$REPLY" | grep -E "^[Yy]$" > /dev/null | ||
| then | ||
| if echo "$REPLY" | grep -E "^[Yy]$" >/dev/null; then | ||
| exit 0 | ||
| fi | ||
| exit 1 | ||
| else | ||
| npm run util:check-squash-mergeable-branch | ||
| exit | ||
| fi | ||
| fi | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| module.exports = { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to add
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It may not be needed but I like being explicit when dealing with commonjs vs esmodules since it can be a bit of a clustergoof. Would you prefer the file be named
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was commenting about adding a lint filter for
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, my mistake. As we discussed on Teams, we would need to add an eslintrc to the root in order to lint The next step in the monorepo setup is splitting out the shared eslint configuration and extending it in the individual packages. Once that happens we use the shared eslintrc in the root directory, and include the cjs file. Here is one of turbo's examples that shows this in practice: We held off on splitting code out of CC for now becaues it makes more sense to make the monorepo transition incrementally. I'll create a follow up issue for splitting out the eslint/tsconfig/storybook/demos.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| "*.{json,html,yml}": [ | ||
| "prettier --write" | ||
| ], | ||
| "*.scss": [ | ||
| "stylelint --fix", | ||
| "prettier --write" | ||
| ], | ||
| "packages/**/*.{ts,tsx}": [ | ||
| // prevents an error due to tsconfig.json not being in the root directory | ||
| // https://github.com/okonet/lint-staged/issues/825#issuecomment-620018284 | ||
|
benelan marked this conversation as resolved.
|
||
| () => "eslint --ext .ts,.tsx --fix", | ||
| "prettier --write" | ||
| ], | ||
| "*.md": [ | ||
| "markdownlint --fix --disable MD024 MD013 MD041 MD033", | ||
| "prettier --write" | ||
| ] | ||
| }; | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1 @@ | ||
| save-exact=true | ||
| access=public |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "packages/calcite-components": "1.4.2", | ||
| "packages/calcite-components-react": "1.4.2" | ||
| } |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "$schema": "node_modules/lerna/schemas/lerna-schema.json", | ||
| "useWorkspaces": true, | ||
| "version": "independent", | ||
| "changelogPreset": "conventionalcommits", | ||
| "command": { | ||
| "version": { | ||
| "conventionalCommits": true | ||
| } | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.