Skip to content

Commit 568a027

Browse files
committed
ci(workflows): standardize workflow configuration
- build: always run on push to main (keep path filters for PRs) - lint-pr-title: rename from commit-lint, remove commit message linting - contributors: add html output format, run at 1:00 AM EST - publish: use calendar versioning (YYYY.MMDD.RUN_NUMBER)
1 parent 2ffea2d commit 568a027

5 files changed

Lines changed: 39 additions & 73 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ on:
1313
push:
1414
branches:
1515
- main
16-
paths:
17-
- 'src/**'
18-
- 'package.json'
19-
- 'package-lock.json'
20-
- 'tsconfig.json'
21-
- '.github/workflows/build.yml'
2216

2317
jobs:
2418
build:

.github/workflows/commit-lint.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.github/workflows/contributors.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ name: Update Contributors
22

33
on:
44
schedule:
5-
- cron: '0 0 * * *'
5+
- cron: '0 6 * * *' # 1:00 AM EST / 2:00 AM EDT
66
workflow_dispatch:
77

88
jobs:
99
contributors:
1010
uses: CodingWithCalvin/.github/.github/workflows/contributors.yml@main
11+
with:
12+
output_format: html
1113
secrets: inherit
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Lint PR Title
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, reopened, synchronize]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: read
10+
11+
jobs:
12+
lint-pr-title:
13+
name: Lint PR Title
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20'
23+
24+
- name: Install commitlint
25+
run: |
26+
npm install --save-dev @commitlint/cli@18.4.3 @commitlint/config-conventional@18.4.3
27+
28+
- name: Validate PR title
29+
env:
30+
PR_TITLE: ${{ github.event.pull_request.title }}
31+
run: |
32+
echo "Validating PR title: $PR_TITLE"
33+
echo "$PR_TITLE" | npx commitlint --verbose

.github/workflows/publish.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ name: Publish to VS Code Marketplace
22

33
on:
44
workflow_dispatch:
5-
inputs:
6-
version:
7-
description: 'Version to release (e.g., 1.0.0)'
8-
required: true
9-
type: string
105

116
permissions:
127
contents: write
@@ -42,8 +37,9 @@ jobs:
4237
- name: Set version
4338
id: version
4439
run: |
45-
npm version ${{ inputs.version }} --no-git-tag-version --allow-same-version
46-
echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT
40+
VERSION=$(date +'%Y.%m%d').${{ github.run_number }}
41+
npm version $VERSION --no-git-tag-version --allow-same-version
42+
echo "version=$VERSION" >> $GITHUB_OUTPUT
4743
4844
- name: Package VSIX
4945
run: npx @vscode/vsce package -o CodingWithCalvin.VSC-MCPServer.vsix

0 commit comments

Comments
 (0)