Skip to content

Commit 08fd7fe

Browse files
committed
fix
1 parent 0190d24 commit 08fd7fe

File tree

3 files changed

+15
-27
lines changed

3 files changed

+15
-27
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
name: CI
1+
name: Continuous Integration / Pull Request
22

33
on:
4-
push:
5-
branches: [master]
64
pull_request:
7-
branches: [master]
5+
branches:
6+
- master
87

98
jobs:
109
lint:

.github/workflows/release.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
name: Release
22

33
on:
4-
workflow_dispatch: # manual trigger
5-
push:
6-
branches: [master] # assumes your main branch is master
4+
workflow_dispatch:
75

86
concurrency:
9-
group: release # never run two releases in parallel
7+
group: release
108
cancel-in-progress: true
119

1210
jobs:
@@ -21,10 +19,9 @@ jobs:
2119
steps:
2220
- uses: actions/checkout@v4
2321
with:
24-
fetch-depth: 0 # semantic-release needs full history & tags
25-
persist-credentials: false # use GitHub token with correct permissions
22+
fetch-depth: 0
23+
persist-credentials: false
2624

27-
# -------- pnpm + node (same cache strategy used in CI) ----
2825
- uses: pnpm/action-setup@v4
2926
- uses: actions/setup-node@v4
3027
with:
@@ -35,15 +32,13 @@ jobs:
3532

3633
- run: pnpm install --frozen-lockfile
3734

38-
# (optional) run tests / build again for extra safety
3935
- run: pnpm run test
36+
4037
- run: pnpm run build
4138

42-
# -------- install semantic-release and plugins --------
4339
- name: Install semantic-release
4440
run: pnpm add -D semantic-release @semantic-release/changelog @semantic-release/git conventional-changelog-conventionalcommits
4541

46-
# -------- run release --------
4742
- name: Run semantic-release
4843
env:
4944
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/semantics.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
name: PR Semantics
1+
name: Pull Request Semantics
22

33
on:
44
pull_request:
5-
types: [opened, edited, reopened, synchronize]
5+
branches:
6+
- master
67

78
jobs:
89
semantics:
@@ -23,21 +24,14 @@ jobs:
2324
extends: ['@commitlint/config-angular'], \
2425
rules: { \
2526
'subject-empty': [2, 'never'], \
26-
'scope-empty' : [2, 'never'], \
27-
'type-case' : [2, 'always', 'lower-case'], \
28-
'type-empty' : [2, 'never'], \
29-
'type-enum' : [2, 'always', ['chore','feat','fix','refactor']], \
30-
'scope-enum' : [2, 'always', ['openapi']] \
27+
'scope-empty': [0, 'never'], \
28+
'type-case': [2, 'always', 'lower-case'], \
29+
'type-empty': [2, 'never'], \
30+
'type-enum': [2, 'always', ['chore','feat','fix','refactor']] \
3131
} \
3232
};" > commitlint.config.js
3333
3434
- name: Validate Semantic Title
3535
if: ${{ steps.pull-request.outputs.pr_found == 'true' }}
3636
run: |
3737
echo "${{ steps.pull-request.outputs.pr_title }}" | npx commitlint
38-
39-
- name: Get Semantic Commit Scope
40-
if: ${{ steps.pull-request.outputs.pr_found == 'true' }}
41-
id: scope
42-
run: |
43-
echo "name=$(echo '${{ steps.pull-request.outputs.pr_title }}' | cut -d'(' -f1)" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)