-
-
Notifications
You must be signed in to change notification settings - Fork 7k
81 lines (79 loc) · 2.43 KB
/
nightly-schedule.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
name: Scheduled Nightly Release
on:
workflow_dispatch:
schedule:
- cron: '0 12 * * *' # 1200 UTC
jobs:
deploy:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'vuetifyjs' }}
strategy:
max-parallel: 1
fail-fast: false
matrix:
branch: ['master', 'dev', 'next', 'v2-stable', 'v2-dev']
include:
- branch: 'master'
tag: 'latest'
- branch: 'dev'
tag: 'dev'
- branch: 'next'
tag: 'next'
- branch: 'v2-stable'
tag: 'v2-stable'
- branch: 'v2-dev'
tag: 'v2-dev'
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
fetch-depth: 0
- run: |
last=$(git show -s --format=%ct HEAD)
now=$(date +%s)
diff=$(($now - $last))
if [ $diff -gt 86400 ]; then
echo "Last commit was more than 24 hours ago, skipping release"
exit 1
fi
- run: echo "RELEASE_ID=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- uses: ./.github/actions/nightly-release
with:
checkout-repo: ${{ github.repository }}
checkout-ref: ${{ matrix.branch }}
release-id: ${{ matrix.branch }}.${{ env.RELEASE_ID }}
npm-tag: ${{ matrix.tag }}
npm-token: ${{ secrets.NPM_TOKEN }}
- uses: actions/checkout@v4
percy:
name: Visual regression tests
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'vuetifyjs' }}
steps:
- uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0
- run: |
last=$(git show -s --format=%ct HEAD)
now=$(date +%s)
diff=$(($now - $last))
if [ $diff -gt 86400 ]; then
echo "Last commit was more than 24 hours ago, skipping tests"
exit 1
fi
- uses: ./.github/actions/pnpm-install
- run: echo "COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
- run: pnpm cy:run
working-directory: ./packages/vuetify
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
PERCY_BRANCH: master
PERCY_TARGET_BRANCH: master
PERCY_COMMIT: ${{ env.COMMIT }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: ./packages/vuetify/cypress/screenshots/
if-no-files-found: ignore