-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (65 loc) · 1.86 KB
/
main.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: Lint and release packages
on: # yamllint disable-line rule:truthy
push:
branches: [ main ]
jobs:
lint-linters:
name: Lint the linters repository
runs-on: ubuntu-latest
steps:
- name: Checkout repository
timeout-minutes: 5
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install nodejs
timeout-minutes: 5
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
timeout-minutes: 5
run: pnpm i
- name: Lint repository
timeout-minutes: 5
run: pnpm lint
npm-publish:
name: Publish package to npm
runs-on: ubuntu-latest
if: contains( join( github.event.commits.*.message, ', ' ), '[ci release]' )
needs:
- lint-linters
strategy:
matrix:
package:
- packages/bundled-eslint-config
- packages/bundled-stylelint-config
steps:
- name: Checkout repository
timeout-minutes: 5
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install nodejs
timeout-minutes: 5
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
timeout-minutes: 5
run: pnpm i
- name: Build packages
timeout-minutes: 5
run: pnpm build && pnpm -r build
- uses: JS-DevTools/npm-publish@4b07b26a2f6e0a51846e1870223e545bae91c552 # v3
timeout-minutes: 5
with:
access: public
package: ${{ matrix.package }}/package.json
token: ${{ secrets.NPM_TOKEN }}