|
1 | 1 | name: CI |
2 | 2 | on: |
3 | | - push: |
4 | | - branches: |
5 | | - # default semantic-release branches |
6 | | - - +([0-9])?(.{+([0-9]),x}).x |
7 | | - - main |
8 | | - - next |
9 | | - - next-major |
10 | | - - beta |
11 | | - - alpha |
12 | | - pull_request: |
13 | | - schedule: |
14 | | - - cron: 0 0 * * 0 |
| 3 | + push: |
| 4 | + branches: |
| 5 | + # default semantic-release branches |
| 6 | + - +([0-9])?(.{+([0-9]),x}).x |
| 7 | + - main |
| 8 | + - next |
| 9 | + - next-major |
| 10 | + - beta |
| 11 | + - alpha |
| 12 | + pull_request: |
| 13 | + schedule: |
| 14 | + - cron: 0 0 * * 0 |
15 | 15 |
|
16 | 16 | jobs: |
17 | | - lint: |
18 | | - name: ⬣ Lint |
19 | | - runs-on: ubuntu-latest |
20 | | - steps: |
21 | | - - name: 🛑 Cancel Previous Runs |
22 | | - uses: styfle/cancel-workflow-action@0.11.0 |
23 | | - |
24 | | - - name: ⬇️ Checkout repo |
25 | | - uses: actions/checkout@v3 |
26 | | - |
27 | | - - name: ⎔ Setup Node |
28 | | - uses: actions/setup-node@v3 |
29 | | - with: |
30 | | - node-version: 18 |
31 | | - |
32 | | - - name: 📥 Install dependencies |
33 | | - run: npm install |
34 | | - |
35 | | - - name: ▶️ Run lint script |
36 | | - run: npm run lint |
37 | | - |
38 | | - test: |
39 | | - name: |
40 | | - 🧪 Test (Node@${{ matrix.node }} - ESLint@${{ matrix.eslint }} - ${{ |
41 | | - matrix.os }}) |
42 | | - strategy: |
43 | | - matrix: |
44 | | - eslint: [6] |
45 | | - node: [12.22.0, 12, 14.17.0, 14, 16, 18] |
46 | | - os: [ubuntu-latest] |
47 | | - include: |
48 | | - # On other platforms |
49 | | - - os: windows-latest |
50 | | - eslint: 6 |
51 | | - node: 18 |
52 | | - - os: macos-latest |
53 | | - eslint: 6 |
54 | | - node: 18 |
55 | | - # On the minimum supported ESLint/Node.js version |
56 | | - - eslint: 6.6.0 |
57 | | - node: 12.22.0 |
58 | | - os: ubuntu-latest |
59 | | - runs-on: ${{ matrix.os }} |
60 | | - steps: |
61 | | - - name: 🛑 Cancel Previous Runs |
62 | | - uses: styfle/cancel-workflow-action@0.11.0 |
63 | | - |
64 | | - - name: ⬇️ Checkout repo |
65 | | - uses: actions/checkout@v3 |
66 | | - |
67 | | - - name: ⎔ Setup Node v${{ matrix.node }} |
68 | | - uses: actions/setup-node@v3 |
69 | | - with: |
70 | | - node-version: ${{ matrix.node }} |
71 | | - |
72 | | - - name: 📥 Install dependencies |
73 | | - run: npm install |
74 | | - |
75 | | - # - name: 📥 Install ESLint v${{ matrix.eslint }} |
76 | | - # run: npm install --save-dev eslint@${{ matrix.eslint }} |
77 | | - |
78 | | - - name: ▶️ Run test script |
79 | | - run: npm run test |
80 | | - |
81 | | - - name: ⬆️ Upload coverage report |
82 | | - uses: codecov/codecov-action@v3 |
83 | | - |
84 | | - release: |
85 | | - name: 🚀 Release |
86 | | - needs: [lint, test] |
87 | | - runs-on: ubuntu-latest |
88 | | - if: |
89 | | - github.repository == 'eslint-community/eslint-plugin-mysticatea' && |
90 | | - contains('refs/heads/main,refs/heads/next,refs/heads/beta,refs/heads/alpha', |
91 | | - github.ref) && github.event_name == 'push' |
92 | | - steps: |
93 | | - - name: 🛑 Cancel Previous Runs |
94 | | - uses: styfle/cancel-workflow-action@0.11.0 |
95 | | - |
96 | | - - name: ⬇️ Checkout repo |
97 | | - uses: actions/checkout@v3 |
98 | | - |
99 | | - - name: ⎔ Setup node |
100 | | - uses: actions/setup-node@v3 |
101 | | - with: |
102 | | - node-version: 18 |
103 | | - |
104 | | - - name: 📥 Install dependencies |
105 | | - run: npm install |
106 | | - |
107 | | - - name: 🚀 Release |
108 | | - uses: cycjimmy/semantic-release-action@v3 |
109 | | - with: |
110 | | - semantic_version: 19 |
111 | | - branches: | |
112 | | - [ |
113 | | - '+([0-9])?(.{+([0-9]),x}).x', |
114 | | - 'main', |
115 | | - 'next', |
116 | | - 'next-major', |
117 | | - {name: 'beta', prerelease: true}, |
118 | | - {name: 'alpha', prerelease: true} |
119 | | - ] |
120 | | - env: |
121 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
122 | | - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 17 | + lint: |
| 18 | + name: ⬣ Lint |
| 19 | + runs-on: ubuntu-latest |
| 20 | + steps: |
| 21 | + - name: 🛑 Cancel Previous Runs |
| 22 | + uses: styfle/cancel-workflow-action@0.11.0 |
| 23 | + |
| 24 | + - name: ⬇️ Checkout repo |
| 25 | + uses: actions/checkout@v3 |
| 26 | + |
| 27 | + - name: ⎔ Setup Node |
| 28 | + uses: actions/setup-node@v3 |
| 29 | + with: |
| 30 | + node-version: 18 |
| 31 | + |
| 32 | + - name: 📥 Install dependencies |
| 33 | + run: npm install |
| 34 | + |
| 35 | + - name: ▶️ Run lint script |
| 36 | + run: npm run lint |
| 37 | + |
| 38 | + test: |
| 39 | + name: |
| 40 | + 🧪 Test (Node@${{ matrix.node }} - ESLint@${{ matrix.eslint }} - ${{ |
| 41 | + matrix.os }}) |
| 42 | + strategy: |
| 43 | + matrix: |
| 44 | + eslint: [6] |
| 45 | + node: [12.22.0, 12, 14.17.0, 14, 16, 18] |
| 46 | + os: [ubuntu-latest] |
| 47 | + include: |
| 48 | + # On other platforms |
| 49 | + - os: windows-latest |
| 50 | + eslint: 6 |
| 51 | + node: 18 |
| 52 | + - os: macos-latest |
| 53 | + eslint: 6 |
| 54 | + node: 18 |
| 55 | + # On the minimum supported ESLint/Node.js version |
| 56 | + - eslint: 6.6.0 |
| 57 | + node: 12.22.0 |
| 58 | + os: ubuntu-latest |
| 59 | + runs-on: ${{ matrix.os }} |
| 60 | + steps: |
| 61 | + - name: 🛑 Cancel Previous Runs |
| 62 | + uses: styfle/cancel-workflow-action@0.11.0 |
| 63 | + |
| 64 | + - name: ⬇️ Checkout repo |
| 65 | + uses: actions/checkout@v3 |
| 66 | + |
| 67 | + - name: ⎔ Setup Node v${{ matrix.node }} |
| 68 | + uses: actions/setup-node@v3 |
| 69 | + with: |
| 70 | + node-version: ${{ matrix.node }} |
| 71 | + |
| 72 | + - name: 📥 Install dependencies |
| 73 | + run: npm install |
| 74 | + |
| 75 | + # - name: 📥 Install ESLint v${{ matrix.eslint }} |
| 76 | + # run: npm install --save-dev eslint@${{ matrix.eslint }} |
| 77 | + |
| 78 | + - name: ▶️ Run test script |
| 79 | + run: npm run test |
| 80 | + |
| 81 | + - name: ⬆️ Upload coverage report |
| 82 | + uses: codecov/codecov-action@v3 |
| 83 | + |
| 84 | + release: |
| 85 | + name: 🚀 Release |
| 86 | + needs: [lint, test] |
| 87 | + runs-on: ubuntu-latest |
| 88 | + if: github.repository == 'eslint-community/eslint-plugin-mysticatea' && |
| 89 | + contains('refs/heads/main,refs/heads/next,refs/heads/beta,refs/heads/alpha', |
| 90 | + github.ref) && github.event_name == 'push' |
| 91 | + steps: |
| 92 | + - name: 🛑 Cancel Previous Runs |
| 93 | + uses: styfle/cancel-workflow-action@0.11.0 |
| 94 | + |
| 95 | + - name: ⬇️ Checkout repo |
| 96 | + uses: actions/checkout@v3 |
| 97 | + |
| 98 | + - name: ⎔ Setup node |
| 99 | + uses: actions/setup-node@v3 |
| 100 | + with: |
| 101 | + node-version: 18 |
| 102 | + |
| 103 | + - name: 📥 Install dependencies |
| 104 | + run: npm install |
| 105 | + |
| 106 | + - name: 🚀 Release |
| 107 | + uses: cycjimmy/semantic-release-action@v3 |
| 108 | + with: |
| 109 | + semantic_version: 19 |
| 110 | + branches: | |
| 111 | + [ |
| 112 | + '+([0-9])?(.{+([0-9]),x}).x', |
| 113 | + 'main', |
| 114 | + 'next', |
| 115 | + 'next-major', |
| 116 | + {name: 'beta', prerelease: true}, |
| 117 | + {name: 'alpha', prerelease: true} |
| 118 | + ] |
| 119 | + env: |
| 120 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 121 | + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
0 commit comments