-
-
Notifications
You must be signed in to change notification settings - Fork 7k
160 lines (149 loc) Β· 5.11 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
158
159
160
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 }}
CROWDIN_BRANCH: v2
jobs:
close:
runs-on: ubuntu-22.04
if: github.event_name == 'push' && (github.ref == 'refs/heads/v2-stable' || github.ref == 'refs/heads/v2-dev') && github.repository_owner == 'vuetifyjs'
steps:
- uses: vuetifyjs/close-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
node_modules
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
- run: yarn --frozen-lockfile --non-interactive
- run: yarn run build:lib
working-directory: ./packages/vuetify
- run: yarn run lint
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
node_modules
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
- run: yarn --frozen-lockfile --non-interactive
- run: yarn lerna run test:coverage -- -- -i
- uses: codecov/codecov-action@v1
deploy:
needs: [lint, test]
runs-on: ubuntu-22.04
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/v') && github.repository_owner == 'vuetifyjs'
steps:
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
node_modules
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
- run: yarn --frozen-lockfile --non-interactive
- run: yarn lerna run build --scope vuetify
- run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- run: rm -rf release
- run: cp -r ./packages/vuetify/dist release
- run: for file in ./release/*.*; do mv "$file" "${file/release\/vuetify/release/vuetify-${RELEASE_TAG}}"; done
- run: zip -jr "release/vuetify-${RELEASE_TAG}.zip" release/*
- name: NPM Release
run: bash scripts/deploy.sh
env:
NPM_API_KEY: ${{ secrets.NPM_TOKEN }}
TAG_NAME: ${{ env.RELEASE_TAG }}
- name: GitHub release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_TAG }}
release_name: ${{ env.RELEASE_TAG }}
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: release/vuetify-${{ env.RELEASE_TAG }}.zip
asset_name: vuetify-${{ env.RELEASE_TAG }}.zip
asset_content_type: application/zip
publish-docs:
needs: [lint, test]
runs-on: ubuntu-22.04
if: github.event_name == 'push' && github.repository_owner == 'vuetifyjs' && (github.ref == 'refs/heads/v2-stable' || github.ref == 'refs/heads/v2-dev')
steps:
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
node_modules
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
- run: yarn global add vercel
- name: Download eo-UY
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: 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 run build:modified
working-directory: ./packages/docs
- run: node scripts/deploy-and-alias.js ${{ github.ref }}
env:
NOW_TOKEN: ${{ secrets.NOW_TOKEN }}