Skip to content

Commit 48b7e2b

Browse files
chore: update validate.yml
1 parent eac998e commit 48b7e2b

File tree

2 files changed

+83
-39
lines changed

2 files changed

+83
-39
lines changed

.github/workflows/eslint-plugin-jest-dom.yml

-39
This file was deleted.

.github/workflows/validate.yml

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: validate
2+
on:
3+
push:
4+
branches:
5+
- '+([0-9])?(.{+([0-9]),x}).x'
6+
- 'main'
7+
- 'next'
8+
- 'next-major'
9+
- 'beta'
10+
- 'alpha'
11+
- '!all-contributors/**'
12+
pull_request: {}
13+
jobs:
14+
main:
15+
# ignore all-contributors PRs
16+
if: ${{ !contains(github.head_ref, 'all-contributors') }}
17+
strategy:
18+
matrix:
19+
node: [10, 12, 14, 16]
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: 🛑 Cancel Previous Runs
23+
uses: styfle/[email protected]
24+
25+
- name: ⬇️ Checkout repo
26+
uses: actions/checkout@v2
27+
28+
- name: ⎔ Setup node
29+
uses: actions/setup-node@v2
30+
with:
31+
node-version: ${{ matrix.node }}
32+
33+
- name: 📥 Download deps
34+
uses: bahmutov/npm-install@v1
35+
with:
36+
useLockFile: false
37+
38+
- name: ▶️ Run validate script
39+
run: npm run validate
40+
41+
- name: ⬆️ Upload coverage report
42+
uses: codecov/codecov-action@v2
43+
44+
release:
45+
needs: main
46+
runs-on: ubuntu-latest
47+
if:
48+
${{ github.repository == 'testing-library/eslint-plugin-jest-dom' &&
49+
contains('refs/heads/main,refs/heads/beta,refs/heads/next,refs/heads/alpha',
50+
github.ref) && github.event_name == 'push' }}
51+
steps:
52+
- name: 🛑 Cancel Previous Runs
53+
uses: styfle/[email protected]
54+
55+
- name: ⬇️ Checkout repo
56+
uses: actions/checkout@v2
57+
58+
- name: ⎔ Setup node
59+
uses: actions/setup-node@v2
60+
with:
61+
node-version: 16
62+
63+
- name: 📥 Download deps
64+
uses: bahmutov/npm-install@v1
65+
with:
66+
useLockFile: false
67+
68+
- name: 🚀 Release
69+
uses: cycjimmy/semantic-release-action@v2
70+
with:
71+
semantic_version: 17
72+
branches: |
73+
[
74+
'+([0-9])?(.{+([0-9]),x}).x',
75+
'main',
76+
'next',
77+
'next-major',
78+
{name: 'beta', prerelease: true},
79+
{name: 'alpha', prerelease: true}
80+
]
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)