Skip to content

Commit 4b9d24f

Browse files
Merge remote-tracking branch 'origin/main' into diff-edit-failed
2 parents c587c6f + c2eec68 commit 4b9d24f

40 files changed

+668
-1766
lines changed

.changes/header.tpl.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
6+
and is generated by [Changie](https://github.com/miniscruff/changie).

.changes/unreleased/.gitkeep

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: Added
2+
body: new section to README about Changie
3+
time: 2025-01-29T01:07:30.285298-08:00

.changie.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
changesDir: .changes
2+
unreleasedDir: unreleased
3+
headerPath: header.tpl.md
4+
changelogPath: CHANGELOG.md
5+
versionExt: md
6+
versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}'
7+
kindFormat: "### {{.Kind}}"
8+
changeFormat: "* {{.Body}}"
9+
kinds:
10+
- label: Added
11+
auto: minor
12+
- label: Changed
13+
auto: major
14+
- label: Deprecated
15+
auto: minor
16+
- label: Removed
17+
auto: major
18+
- label: Fixed
19+
auto: patch
20+
- label: Security
21+
auto: patch
22+
newlines:
23+
afterChangelogHeader: 1
24+
beforeChangelogVersion: 1
25+
endOfVersion: 1
26+
envPrefix: CHANGIE_

.github/workflows/prerelease-publish.yml

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

.github/workflows/publish.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: "Publish Release"
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release-type:
7+
description: "Choose release type (release or pre-release)"
8+
required: true
9+
default: "release"
10+
type: choice
11+
options:
12+
- pre-release
13+
- release
14+
15+
permissions:
16+
contents: write
17+
packages: write
18+
19+
jobs:
20+
test:
21+
uses: ./.github/workflows/test.yml
22+
23+
publish:
24+
needs: test
25+
name: Publish Extension
26+
runs-on: ubuntu-latest
27+
environment: publish
28+
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- name: Setup Node.js
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: 20.15.1
36+
37+
# Cache root dependencies - only reuse if package-lock.json exactly matches
38+
- name: Cache root dependencies
39+
uses: actions/cache@v4
40+
id: root-cache
41+
with:
42+
path: node_modules
43+
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
44+
45+
# Cache webview-ui dependencies - only reuse if package-lock.json exactly matches
46+
- name: Cache webview-ui dependencies
47+
uses: actions/cache@v4
48+
id: webview-cache
49+
with:
50+
path: webview-ui/node_modules
51+
key: ${{ runner.os }}-npm-webview-${{ hashFiles('webview-ui/package-lock.json') }}
52+
53+
- name: Install root dependencies
54+
if: steps.root-cache.outputs.cache-hit != 'true'
55+
run: npm ci
56+
57+
- name: Install webview-ui dependencies
58+
if: steps.webview-cache.outputs.cache-hit != 'true'
59+
run: cd webview-ui && npm ci
60+
61+
- name: Install Publishing Tools
62+
run: npm install -g vsce ovsx
63+
64+
- name: Get Version
65+
id: get_version
66+
run: echo "version=$(node -p \"require('./package.json').version\")" >> $GITHUB_OUTPUT
67+
68+
- name: Create Git Tag
69+
run: |
70+
VERSION=v${{ steps.get_version.outputs.version }}
71+
echo "Tagging with $VERSION"
72+
git tag "$VERSION"
73+
git push origin "$VERSION"
74+
75+
- name: Package and Publish Extension
76+
env:
77+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
78+
OVSX_PAT: ${{ secrets.OVSX_PAT }}
79+
run: |
80+
# Required to generate the .vsix
81+
vsce package --out "cline-${{ steps.get_version.outputs.version }}.vsix"
82+
83+
if [ "${{ github.event.inputs.release-type }}" = "pre-release" ]; then
84+
npm run publish:marketplace:prerelease
85+
echo "Successfully published pre-release version ${{ steps.get_version.outputs.version }} to VS Code Marketplace and Open VSX Registry"
86+
else
87+
npm run publish:marketplace
88+
echo "Successfully published release version ${{ steps.get_version.outputs.version }} to VS Code Marketplace and Open VSX Registry"
89+
fi
90+
91+
- name: Get Changelog Entry
92+
id: changelog
93+
uses: mindsers/changelog-reader-action@v2
94+
with:
95+
# This expects a standard Keep a Changelog format
96+
# "latest" means it will read whichever is the most recent version
97+
# set in "## [1.2.3] - 2025-01-28" style
98+
version: latest
99+
100+
- name: Create GitHub Release
101+
uses: softprops/action-gh-release@v1
102+
with:
103+
files: "*.vsix"
104+
body: ${{ steps.changelog.outputs.content }}
105+
generate_release_notes: false
106+
prerelease: ${{ github.event.inputs.release-type == 'pre-release' }}
107+
env:
108+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

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

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
# Change Log
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
6+
and is generated by [Changie](https://github.com/miniscruff/changie).
7+
28

39
## [3.2.6]
410

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,31 @@ To contribute to the project, start with our [Contributing Guide](CONTRIBUTING.m
160160

161161
</details>
162162

163+
<details>
164+
<summary>Creating a Pull Request</summary>
165+
166+
1. Before creating a PR, generate a changelog entry using [Changie](https://changie.dev/):
167+
```bash
168+
npm run changie new
169+
```
170+
This will prompt you for:
171+
- Kind of change (Added, Changed, Deprecated, Removed, Fixed, Security)
172+
- `Added` → triggers minor version bump (1.0.0 → 1.1.0)
173+
- `Changed`, `Deprecated`, `Removed`, `Fixed`, `Security` → triggers patch version bump (1.0.0 → 1.0.1)
174+
- Breaking changes → triggers major version bump (1.0.0 → 2.0.0)
175+
- Description of your changes
176+
- Issue number (if applicable)
177+
178+
2. Commit your changes and the generated `.changes` file
179+
180+
3. Push your branch and create a PR on GitHub. Our CI will:
181+
- Run tests and checks
182+
- When merged to main, automatically batch changelog entries
183+
- Create a version PR with the updated CHANGELOG.md
184+
185+
</details>
186+
187+
163188
## License
164189

165190
[Apache 2.0 © 2024 Cline Bot Inc.](./LICENSE)

0 commit comments

Comments
 (0)