Skip to content

Commit 28245e9

Browse files
authored
ci: added semantic pr (#12)
1 parent a7d47a0 commit 28245e9

3 files changed

Lines changed: 85 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,19 @@ jobs:
8787
name: component-coverage
8888
path: coverage/
8989
retention-days: 7
90+
91+
ready-to-merge:
92+
runs-on: ubuntu-latest
93+
needs: [format, lint, build, test]
94+
if: always()
95+
steps:
96+
- name: Check all jobs passed
97+
run: |
98+
if [[ "${{ needs.format.result }}" != "success" ]] || \
99+
[[ "${{ needs.lint.result }}" != "success" ]] || \
100+
[[ "${{ needs.build.result }}" != "success" ]] || \
101+
[[ "${{ needs.test.result }}" != "success" ]]; then
102+
echo "One or more required jobs failed"
103+
exit 1
104+
fi
105+
echo "All required jobs passed!"

.github/workflows/pr-title.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: PR Title Check
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, synchronize, reopened]
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: amannn/action-semantic-pull-request@v5
12+
env:
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
with:
15+
# Configure which types are allowed
16+
types: |
17+
feat
18+
fix
19+
docs
20+
style
21+
refactor
22+
perf
23+
test
24+
build
25+
ci
26+
chore
27+
revert
28+
# Require scope to be provided
29+
requireScope: false
30+
# Configure which scopes are allowed (empty = any scope allowed)
31+
scopes: |
32+
cli
33+
mcp
34+
devbox
35+
blueprint
36+
snapshot
37+
config
38+
auth
39+
ui
40+
deps
41+
# Ensure the subject starts with a lowercase letter
42+
subjectPattern: ^(?![A-Z]).+$
43+
subjectPatternError: |
44+
The subject "{subject}" found in the pull request title "{title}"
45+
should start with a lowercase letter.
46+
47+
Examples:
48+
- feat: add new devbox command
49+
- fix(cli): resolve argument parsing issue
50+
- docs: update README with usage examples
51+

.github/workflows/release.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: googleapis/release-please-action@v4
16+
with:
17+
release-type: node
18+

0 commit comments

Comments
 (0)