forked from vuetifyjs/vuetify
-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (117 loc) · 4.21 KB
/
ci.yml
File metadata and controls
126 lines (117 loc) · 4.21 KB
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
name: CI
on: [push, pull_request]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
CROWDIN_BRANCH: master
LOCAL_BRANCH: docs/update-from-crowdin
jobs:
lint:
runs-on: ubuntu-latest
steps:
- 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-latest
steps:
- 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-latest
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/v') && github.repository_owner == 'vuetifyjs'
steps:
- 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-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
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
- run: yarn global add now
- name: Download eo-UY
uses: crowdin/github-action@1.0.10
with:
config: crowdin.yml
upload_sources: false
download_translations: true
push_translations: false
export_only_approved: false
download_language: eo
localization_branch_name: ${{ env.LOCAL_BRANCH }}
crowdin_branch_name: ${{ env.CROWDIN_BRANCH }}
- name: Download zh-CN
uses: crowdin/github-action@1.0.9
with:
config: crowdin.yml
upload_sources: false
download_translations: true
push_translations: false
export_only_approved: false
download_language: zh-CN
localization_branch_name: ${{ env.LOCAL_BRANCH }}
crowdin_branch_name: ${{ env.CROWDIN_BRANCH }}
- run: yarn run build:modified
working-directory: ./packages/docs
- run: node scripts/deploy-and-alias.js ${{ github.ref }}
env:
NOW_TOKEN: ${{ secrets.NOW_TOKEN }}