Skip to content

Commit

Permalink
chore(ci): build packages in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
KaelWD committed Apr 13, 2023
1 parent 7e84f66 commit 18ab9a4
Showing 1 changed file with 67 additions and 36 deletions.
103 changes: 67 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,32 @@ jobs:
concurrent_skipping: same_content
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'

build-vuetify:
name: Build vuetify
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
node_modules
**/node_modules
/home/runner/.cache/Cypress
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
- run: yarn --frozen-lockfile --non-interactive
- run: yarn build vuetify
- uses: actions/upload-artifact@v3
with:
name: vuetify-dist
path: |
packages/vuetify/dist
packages/vuetify/lib
lint:
name: Lint
needs: pre_job
needs: [pre_job, build-vuetify]
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
strategy:
Expand All @@ -50,8 +73,11 @@ jobs:
**/node_modules
/home/runner/.cache/Cypress
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
- uses: actions/download-artifact@v3
with:
name: vuetify-dist
path: packages/vuetify
- run: yarn --frozen-lockfile --non-interactive
- run: yarn build vuetify
- run: yarn lerna run lint $SCOPES
env:
SCOPES: ${{ matrix.scopes }}
Expand Down Expand Up @@ -113,7 +139,7 @@ jobs:
if-no-files-found: ignore

deploy:
needs: [lint, test-jest, test-cypress]
needs: [lint, test-jest, test-cypress, build-vuetify]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/v') && github.repository_owner == 'vuetifyjs'
steps:
Expand All @@ -127,8 +153,11 @@ jobs:
**/node_modules
/home/runner/.cache/Cypress
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
- uses: actions/download-artifact@v3
with:
name: vuetify-dist
path: packages/vuetify
- run: yarn --frozen-lockfile --non-interactive
- run: yarn build vuetify
- run: yarn build api
- run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- run: rm -rf release
Expand Down Expand Up @@ -156,10 +185,11 @@ jobs:
asset_name: vuetify-${{ env.RELEASE_TAG }}.zip
asset_content_type: application/zip

publish-docs:
needs: [lint, test-jest]
build-docs:
name: Build docs
needs: [pre_job, build-vuetify]
if: needs.pre_job.outputs.should_skip != 'true' && github.event_name == 'push' && github.repository_owner == 'vuetifyjs' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/next')
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.repository_owner == 'vuetifyjs' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/next')
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
Expand All @@ -169,9 +199,11 @@ jobs:
**/node_modules
/home/runner/.cache/Cypress
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
- run: yarn global add vercel
- uses: actions/download-artifact@v3
with:
name: vuetify-dist
path: packages/vuetify
- run: yarn --frozen-lockfile --non-interactive

# TODO: crowdin is returning invalid markdown
# - name: Download eo-UY
# uses: crowdin/github-action@1.1.2
Expand All @@ -183,33 +215,8 @@ jobs:
# export_only_approved: false
# download_language: eo
# crowdin_branch_name: ${{ env.CROWDIN_BRANCH }}
# debug_mode: true

# - name: Download ja
# uses: crowdin/github-action@1.1.2
# with:
# config: crowdin.yml
# upload_sources: false
# download_translations: true
# push_translations: false
# export_only_approved: false
# download_language: ja
# crowdin_branch_name: ${{ env.CROWDIN_BRANCH }}
# debug_mode: true
#
# - name: Download zh-CN
# uses: crowdin/github-action@1.1.2
# with:
# config: crowdin.yml
# upload_sources: false
# download_translations: true
# push_translations: false
# export_only_approved: false
# download_language: zh-CN
# crowdin_branch_name: ${{ env.CROWDIN_BRANCH }}
# debug_mode: true

- run: yarn build
- run: yarn build api
- run: yarn build docs
env:
NODE_OPTIONS: --max-old-space-size=4096
VITE_COSMIC_BUCKET_SLUG: ${{ secrets.COSMIC_BUCKET_SLUG }}
Expand All @@ -221,6 +228,30 @@ jobs:
VITE_EMAILJS_TEMPLATE_ID: ${{ secrets.EMAILJS_TEMPLATE_ID }}
VITE_AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN }}
VITE_AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }}
- uses: actions/upload-artifact@v3
with:
name: docs-dist
path: packages/docs/dist

publish-docs:
needs: [lint, test-jest, build-docs]
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.repository_owner == 'vuetifyjs' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/next')
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
node_modules
**/node_modules
/home/runner/.cache/Cypress
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
- uses: actions/download-artifact@v3
with:
name: docs-dist
path: packages/docs
- run: yarn global add vercel
- run: yarn --frozen-lockfile --non-interactive
- run: node scripts/deploy-and-alias.js ${{ github.ref }}
env:
NOW_TOKEN: ${{ secrets.NOW_TOKEN }}

0 comments on commit 18ab9a4

Please sign in to comment.