Skip to content

Commit de0c7a0

Browse files
committed
ci(workflows): make sure needs are met
1 parent 7b86c03 commit de0c7a0

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

.github/workflows/tests-and-release.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# On master pushes it runs the rule tests and if needed it publishes to NPM (new package.json version).
22

3-
name: Tests & Release
3+
name: Master Workflow
44
on:
55
push:
66
branches: master
77

88
jobs:
9-
publish:
9+
checks:
10+
name: Checks
1011
runs-on: ubuntu-latest
1112
steps:
1213
- name: Checkout code
@@ -29,6 +30,25 @@ jobs:
2930
- name: Rule tests
3031
run: yarn test
3132

33+
release:
34+
name: Release
35+
needs: checks
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout code
39+
uses: actions/checkout@v4
40+
41+
- name: Setup node
42+
uses: actions/setup-node@v3
43+
with:
44+
node-version: 20.x
45+
46+
- name: Install dependencies
47+
run: yarn
48+
49+
- name: Build
50+
run: yarn build
51+
3252
- name: Publish
3353
uses: JS-DevTools/npm-publish@v3
3454
with:

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Runs rule tests on PRs targeting the master.
22

3-
name: Tests
3+
name: PR Workflow
44
on:
55
pull_request:
66
branches: master

0 commit comments

Comments
 (0)