Skip to content

Commit 822742a

Browse files
committed
chore: fix workflow OS matrix
1 parent d2dce57 commit 822742a

File tree

2 files changed

+48
-57
lines changed

2 files changed

+48
-57
lines changed

.github/workflows/publish.yml

Lines changed: 31 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,37 @@
11
name: Release and Publish
22

33
on:
4-
pull_request:
5-
push:
6-
branches: [ master ]
4+
push:
5+
branches:
6+
- master
7+
- alpha
8+
- beta
9+
- next
710

811
jobs:
9-
test:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Checkout
13-
uses: actions/checkout@v4
14-
- name: Setup Node.js
15-
uses: actions/setup-node@v4
16-
with:
17-
node-version: 20
18-
- name: npm install
19-
run: |
20-
npm install
21-
- name: npm lint
22-
run: |
23-
npm run lint
24-
- name: npm test
25-
run: |
26-
npm test
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
2717

28-
release:
29-
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
30-
runs-on: ubuntu-latest
31-
needs: [test]
32-
steps:
33-
- name: Checkout
34-
uses: actions/checkout@v4
35-
- name: Setup Node.js
36-
uses: actions/setup-node@v4
37-
with:
38-
node-version: 20
39-
- name: npm install
40-
run: |
41-
npm install
42-
- name: npx semantic-release
43-
run: |
44-
npx semantic-release
45-
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 20
22+
23+
- name: Install dependencies
24+
run: npm install
25+
26+
- name: Lint files
27+
run: npm run lint
28+
29+
- name: Run tests
30+
run: npm run test
31+
32+
- name: Run semantic release
33+
run: npx semantic-release
34+
env:
35+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
name: Run Lint and Tests
22

3-
on: push
3+
on:
4+
push:
5+
branches-ignore:
6+
- master
7+
- alpha
8+
- beta
9+
- next
410

511
jobs:
612
build:
7-
runs-on: ubuntu-latest
813
strategy:
914
matrix:
1015
os: [ubuntu-latest, macOS-latest, windows-latest]
11-
node-version: [18.x, 20.x]
16+
node-version: [18, 20]
17+
runs-on: ${{ matrix.os }}
18+
1219
steps:
1320
- uses: actions/checkout@v4
21+
1422
- name: Use Node.js ${{ matrix.node-version }}
1523
uses: actions/setup-node@v4
1624
with:
1725
node-version: ${{ matrix.node-version }}
18-
- name: npm install
19-
run: |
20-
npm install
21-
env:
22-
CI: true
23-
- name: npm lint
24-
run: |
25-
npm run lint
26-
env:
27-
CI: true
28-
- name: npm test
29-
run: |
30-
npm test
26+
27+
- run: npm install
28+
29+
- run: npm run lint
30+
31+
- run: npm test

0 commit comments

Comments
 (0)