-
-
Notifications
You must be signed in to change notification settings - Fork 7k
157 lines (148 loc) Β· 5.36 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: CI
on: [push, pull_request]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
pre_job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
if: ${{ !startswith(github.ref, 'refs/tags/v') && github.ref != 'refs/heads/master' }}
uses: fkirc/skip-duplicate-actions@master
with:
skip_after_successful_duplicate: 'true'
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@v4
- uses: vuetifyjs/setup-action@master
- run: pnpm build vuetify
- uses: actions/upload-artifact@v4
with:
name: vuetify-dist
path: |
packages/vuetify/dist
packages/vuetify/lib
lint:
name: Lint
needs: [pre_job, build-vuetify]
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
scopes: ['--scope vuetify --scope @vuetify/api-generator', '--scope vuetifyjs.com']
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: vuetify-dist
- uses: vuetifyjs/setup-action@master
- run: pnpm lerna run lint $SCOPES
env:
SCOPES: ${{ matrix.scopes }}
test-unit:
name: Test (Unit)
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vuetifyjs/setup-action@master
- run: pnpm run test --project unit
working-directory: ./packages/vuetify
test-e2e:
name: Test (e2e)
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vuetifyjs/setup-action@master
- run: pnpm run test --project browser
working-directory: ./packages/vuetify
deploy:
needs: [lint, test-unit, test-e2e, build-vuetify]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/v') && github.repository_owner == 'vuetifyjs'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
name: vuetify-dist
- uses: vuetifyjs/setup-action@master
- run: pnpm build api
- run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: NPM Release
run: bash scripts/deploy.sh
env:
NPM_API_KEY: ${{ secrets.NPM_TOKEN }}
RELEASE_TAG: ${{ env.RELEASE_TAG }}
- name: GitHub release
id: create_release
run: pnpm conventional-github-releaser -p vuetify
env:
DEBUG: '*'
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: vuetify-dist
- uses: vuetifyjs/setup-action@master
- uses: ./.github/actions/download-locales
- run: pnpm build api
- run: pnpm build docs
env:
NODE_OPTIONS: --max-old-space-size=4096
VITE_COSMIC_2_BUCKET_SLUG: ${{ secrets.COSMIC_2_BUCKET_SLUG }}
VITE_COSMIC_2_BUCKET_READ_KEY: ${{ secrets.COSMIC_2_BUCKET_READ_KEY }}
VITE_COSMIC_BUCKET_SLUG: ${{ secrets.COSMIC_BUCKET_SLUG }}
VITE_COSMIC_BUCKET_READ_KEY: ${{ secrets.COSMIC_BUCKET_READ_KEY }}
VITE_COSMIC_BUCKET_SLUG_STORE: ${{ secrets.COSMIC_BUCKET_SLUG_STORE }}
VITE_COSMIC_BUCKET_READ_KEY_STORE: ${{ secrets.COSMIC_BUCKET_READ_KEY_STORE }}
VITE_EMAILJS_PUBLIC_KEY: ${{ secrets.EMAILJS_PUBLIC_KEY }}
VITE_EMAILJS_SERVICE_ID: ${{ secrets.EMAILJS_SERVICE_ID }}
VITE_EMAILJS_TEMPLATE_ID: ${{ secrets.EMAILJS_TEMPLATE_ID }}
VITE_API_SERVER_URL: ${{ secrets.API_SERVER_URL }}
VITE_GITHUB_SHA: ${{ github.sha }}
- uses: actions/upload-artifact@v4
with:
name: docs-dist
path: packages/docs/dist
publish-docs:
needs: [lint, test-unit, build-docs]
runs-on: ubuntu-latest
environment: Production
if: github.event_name == 'push' && github.repository_owner == 'vuetifyjs' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: docs-dist
- uses: vuetifyjs/coolify-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
imageName: docs
coolifyWebhook: ${{ secrets.COOLIFY_WEBHOOK }}
coolifySecret: ${{ secrets.COOLIFY_TOKEN }}