Skip to content

Commit 90f7012

Browse files
committed
ci: split commitlint to discrete check
1 parent 69d0597 commit 90f7012

File tree

1 file changed

+25
-13
lines changed

1 file changed

+25
-13
lines changed

.github/workflows/release.yml

+25-13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
name: CI
12
on:
23
push:
34
branches:
@@ -10,24 +11,20 @@ jobs:
1011
get-next-version:
1112
uses: semantic-release-action/next-release-version/.github/workflows/next-release-version.yml@v4
1213

13-
build:
14-
name: Build
15-
runs-on: ubuntu-latest
16-
needs:
17-
- get-next-version
14+
commitlint:
15+
name: CommitLint
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
1822

19-
steps:
20-
- name: Checkout
21-
uses: actions/checkout@v4
22-
with:
23-
persist-credentials: false
24-
fetch-depth: 0
25-
# checkout as wfcd-bot-boi
26-
token: ${{ secrets.GH_TOKEN }}
2723
- name: Setup Node.js
2824
uses: actions/setup-node@v4
2925
with:
3026
node-version: lts/*
27+
3128
- name: Install Commitlint dependencies
3229
run: npm install --global @commitlint/{cli,config-conventional}
3330

@@ -39,6 +36,20 @@ jobs:
3936
if: github.event_name == 'push'
4037
run: npx commitlint --last --verbose
4138

39+
build:
40+
name: Build
41+
runs-on: ubuntu-latest
42+
needs:
43+
- get-next-version
44+
- commitlint
45+
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@v4
49+
with:
50+
persist-credentials: false
51+
# checkout as wfcd-bot-boi
52+
token: ${{ secrets.GH_TOKEN }}
4253

4354
- name: Install semantic-release-cargo
4455
if: needs.get-next-version.outputs.new-release-published == 'true'
@@ -67,6 +78,7 @@ jobs:
6778
- name: Semantic Release
6879
id: release
6980
uses: cycjimmy/[email protected]
81+
if: needs.get-next-version.outputs.new-release-published == 'true'
7082
env:
7183
# push as wfcd-bot-boi
7284
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

0 commit comments

Comments
 (0)