@contractspec/action.version 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +145 -0
- package/LICENSE +21 -0
- package/README.md +47 -0
- package/action.yml +128 -0
- package/package.json +19 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# @contractspec/action.version
|
|
2
|
+
|
|
3
|
+
## 0.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- fix: publish with bun
|
|
8
|
+
|
|
9
|
+
## 0.15.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 1a0cf44: fix: publishConfig not supported by bun
|
|
14
|
+
|
|
15
|
+
## 0.14.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- d1f0fd0: chore: Migrate non-app package builds from tsdown to shared Bun tooling, add `@contractspec/tool.bun`, and standardize `prebuild`/`build`/`typecheck` with platform-aware exports and `tsc` declaration emission into `dist`.
|
|
20
|
+
|
|
21
|
+
## 0.13.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- 11a5a05: feat: improve product intent
|
|
26
|
+
|
|
27
|
+
## 0.12.1
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- fix: improve publish config
|
|
32
|
+
|
|
33
|
+
## 0.12.0
|
|
34
|
+
|
|
35
|
+
### Minor Changes
|
|
36
|
+
|
|
37
|
+
- fix: release
|
|
38
|
+
|
|
39
|
+
## 0.11.0
|
|
40
|
+
|
|
41
|
+
### Minor Changes
|
|
42
|
+
|
|
43
|
+
- fix: unpublished packages
|
|
44
|
+
|
|
45
|
+
## 0.10.0
|
|
46
|
+
|
|
47
|
+
### Minor Changes
|
|
48
|
+
|
|
49
|
+
- ec5e95c: chore: upgrade dependencies
|
|
50
|
+
|
|
51
|
+
## 0.9.0
|
|
52
|
+
|
|
53
|
+
### Minor Changes
|
|
54
|
+
|
|
55
|
+
- f4180d4: fix: performance improvement
|
|
56
|
+
|
|
57
|
+
### Patch Changes
|
|
58
|
+
|
|
59
|
+
- 1484fa6: Add reusable ContractSpec workflows with shared reporting and document the new automation guidance.
|
|
60
|
+
|
|
61
|
+
## 0.8.0
|
|
62
|
+
|
|
63
|
+
### Minor Changes
|
|
64
|
+
|
|
65
|
+
- d93e6a9: fix: improve website
|
|
66
|
+
|
|
67
|
+
## 0.7.0
|
|
68
|
+
|
|
69
|
+
### Minor Changes
|
|
70
|
+
|
|
71
|
+
- e6faefb: feat: add guide to import existing codebase
|
|
72
|
+
|
|
73
|
+
## 0.6.0
|
|
74
|
+
|
|
75
|
+
### Minor Changes
|
|
76
|
+
|
|
77
|
+
- 5325d6b: feat: improve seo
|
|
78
|
+
|
|
79
|
+
## 0.5.0
|
|
80
|
+
|
|
81
|
+
### Minor Changes
|
|
82
|
+
|
|
83
|
+
- cafd041: fix: impact report comments within github action
|
|
84
|
+
|
|
85
|
+
## 0.4.0
|
|
86
|
+
|
|
87
|
+
### Minor Changes
|
|
88
|
+
|
|
89
|
+
- b0444a4: feat: reduce adoption's friction by allowing generation of contracts from an analyse of the codebase
|
|
90
|
+
|
|
91
|
+
## 0.3.0
|
|
92
|
+
|
|
93
|
+
### Minor Changes
|
|
94
|
+
|
|
95
|
+
- caf8701: feat: add cli vibe command to run workflow
|
|
96
|
+
- c69b849: feat: add api web services (mcp & website)
|
|
97
|
+
- 42b8d78: feat: add cli `contractspec vibe` workflow to simplify usage
|
|
98
|
+
- fd38e85: feat: auto-fix contractspec issues
|
|
99
|
+
|
|
100
|
+
### Patch Changes
|
|
101
|
+
|
|
102
|
+
- e7ded36: feat: improve stability (adding ts-morph)
|
|
103
|
+
- c231a8b: test: improve workspace stability
|
|
104
|
+
|
|
105
|
+
## 0.2.2
|
|
106
|
+
|
|
107
|
+
### Patch Changes
|
|
108
|
+
|
|
109
|
+
- 7e21625: feat: library services (landing page & api)
|
|
110
|
+
|
|
111
|
+
## 0.2.1
|
|
112
|
+
|
|
113
|
+
### Patch Changes
|
|
114
|
+
|
|
115
|
+
- 2d8a72b: fix: mcp for presentation
|
|
116
|
+
|
|
117
|
+
## 0.2.0
|
|
118
|
+
|
|
119
|
+
### Minor Changes
|
|
120
|
+
|
|
121
|
+
- 07cb19b: feat: feat: cleaude code & opencode integrations
|
|
122
|
+
|
|
123
|
+
## 0.1.4
|
|
124
|
+
|
|
125
|
+
### Patch Changes
|
|
126
|
+
|
|
127
|
+
- a913074: feat: improve ai agents rules management"
|
|
128
|
+
|
|
129
|
+
## 0.1.3
|
|
130
|
+
|
|
131
|
+
### Patch Changes
|
|
132
|
+
|
|
133
|
+
- 9ddd7fa: feat: improve versioning
|
|
134
|
+
|
|
135
|
+
## 0.1.2
|
|
136
|
+
|
|
137
|
+
### Patch Changes
|
|
138
|
+
|
|
139
|
+
- fix: github action
|
|
140
|
+
|
|
141
|
+
## 0.1.1
|
|
142
|
+
|
|
143
|
+
### Patch Changes
|
|
144
|
+
|
|
145
|
+
- e74ea9e: feat: version management
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Chaman Ventures, SASU
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# ContractSpec Version Manager Action
|
|
2
|
+
|
|
3
|
+
> Note: This action is now an internal helper. Prefer `packages/apps/action-pr` and `packages/apps/action-drift`.
|
|
4
|
+
|
|
5
|
+
Automate versioning and changelogs for your ContractSpec workspace.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
name: Release
|
|
11
|
+
|
|
12
|
+
on:
|
|
13
|
+
push:
|
|
14
|
+
branches:
|
|
15
|
+
- main
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
version:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
|
|
23
|
+
- name: ContractSpec Version Bump
|
|
24
|
+
uses: ./packages/apps/action-version
|
|
25
|
+
with:
|
|
26
|
+
mode: bump
|
|
27
|
+
auto-bump: true
|
|
28
|
+
create-pr: true
|
|
29
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Inputs
|
|
33
|
+
|
|
34
|
+
| Input | Description | Default |
|
|
35
|
+
| -------------- | ------------------------------------------- | ----------------------- |
|
|
36
|
+
| `mode` | `analyze` or `bump` | `analyze` |
|
|
37
|
+
| `auto-bump` | Automatically bump versions based on impact | `false` |
|
|
38
|
+
| `create-pr` | Create a Pull Request with changes | `false` |
|
|
39
|
+
| `pr-branch` | Branch name for PR | `release/next-versions` |
|
|
40
|
+
| `github-token` | GitHub token for PR creation | `${{ github.token }}` |
|
|
41
|
+
|
|
42
|
+
## Outputs
|
|
43
|
+
|
|
44
|
+
| Output | Description |
|
|
45
|
+
| -------------- | ---------------------------- |
|
|
46
|
+
| `has-changes` | `true` if versions need bump |
|
|
47
|
+
| `specs-bumped` | Number of specs needing bump |
|
package/action.yml
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
name: 'ContractSpec Version Manager'
|
|
2
|
+
description: 'Automated version bumping and changelog generation for ContractSpec workspaces'
|
|
3
|
+
author: 'LSSM'
|
|
4
|
+
|
|
5
|
+
inputs:
|
|
6
|
+
mode:
|
|
7
|
+
description: 'Action mode: analyze (check only) or bump (apply changes)'
|
|
8
|
+
required: false
|
|
9
|
+
default: 'analyze'
|
|
10
|
+
auto-bump:
|
|
11
|
+
description: 'Whether to automatically applying bumps based on impact analysis'
|
|
12
|
+
required: false
|
|
13
|
+
default: 'false'
|
|
14
|
+
commit-message:
|
|
15
|
+
description: 'Commit message for version bumps'
|
|
16
|
+
required: false
|
|
17
|
+
default: 'chore(release): bump spec versions [skip ci]'
|
|
18
|
+
create-pr:
|
|
19
|
+
description: 'Create a Pull Request instead of pushing directly'
|
|
20
|
+
required: false
|
|
21
|
+
default: 'false'
|
|
22
|
+
pr-title:
|
|
23
|
+
description: 'Title for the Pull Request'
|
|
24
|
+
required: false
|
|
25
|
+
default: 'chore(release): version packages'
|
|
26
|
+
pr-branch:
|
|
27
|
+
description: 'Branch name for the Pull Request'
|
|
28
|
+
required: false
|
|
29
|
+
default: 'release/next-versions'
|
|
30
|
+
github-token:
|
|
31
|
+
description: 'GitHub Token for creating PRs'
|
|
32
|
+
required: false
|
|
33
|
+
default: ${{ github.token }}
|
|
34
|
+
|
|
35
|
+
outputs:
|
|
36
|
+
has-changes:
|
|
37
|
+
description: 'Whether changes were detected/applied'
|
|
38
|
+
value: ${{ steps.analysis.outputs.has-changes }}
|
|
39
|
+
specs-bumped:
|
|
40
|
+
description: 'Number of specs bumped'
|
|
41
|
+
value: ${{ steps.analysis.outputs.specs-bumped }}
|
|
42
|
+
|
|
43
|
+
runs:
|
|
44
|
+
using: "composite"
|
|
45
|
+
steps:
|
|
46
|
+
- name: Setup Bun
|
|
47
|
+
uses: oven-sh/setup-bun@v2
|
|
48
|
+
with:
|
|
49
|
+
bun-version: latest
|
|
50
|
+
|
|
51
|
+
- name: Install Dependencies
|
|
52
|
+
shell: bash
|
|
53
|
+
run: bun install
|
|
54
|
+
|
|
55
|
+
- name: Build CLI (if local)
|
|
56
|
+
shell: bash
|
|
57
|
+
if: ${{ hashFiles('packages/apps/cli-contractspec/package.json') != '' }}
|
|
58
|
+
run: |
|
|
59
|
+
echo "Building local CLI..."
|
|
60
|
+
cd packages/apps/cli-contractspec && bun run build
|
|
61
|
+
echo "CLI_PATH=$(pwd)/dist/index.js" >> $GITHUB_ENV
|
|
62
|
+
|
|
63
|
+
- name: Configure Git
|
|
64
|
+
shell: bash
|
|
65
|
+
run: |
|
|
66
|
+
git config --global user.name "github-actions[bot]"
|
|
67
|
+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
68
|
+
|
|
69
|
+
- name: Analyze Versions
|
|
70
|
+
id: analysis
|
|
71
|
+
shell: bash
|
|
72
|
+
if: ${{ inputs.mode == 'analyze' }}
|
|
73
|
+
run: |
|
|
74
|
+
if [ -n "$CLI_PATH" ]; then
|
|
75
|
+
bun run $CLI_PATH version analyze --format json > analysis.json
|
|
76
|
+
else
|
|
77
|
+
bunx @lssm/app.cli-contractspec version analyze --format json > analysis.json
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
COUNT=$(jq '.specsNeedingBump' analysis.json)
|
|
81
|
+
echo "specs-bumped=$COUNT" >> $GITHUB_OUTPUT
|
|
82
|
+
if [ "$COUNT" -gt "0" ]; then
|
|
83
|
+
echo "has-changes=true" >> $GITHUB_OUTPUT
|
|
84
|
+
else
|
|
85
|
+
echo "has-changes=false" >> $GITHUB_OUTPUT
|
|
86
|
+
fi
|
|
87
|
+
|
|
88
|
+
- name: Bump Versions
|
|
89
|
+
id: bump
|
|
90
|
+
shell: bash
|
|
91
|
+
if: ${{ inputs.mode == 'bump' }}
|
|
92
|
+
run: |
|
|
93
|
+
ARGS=""
|
|
94
|
+
if [ "${{ inputs.auto-bump }}" == "true" ]; then
|
|
95
|
+
ARGS="--all --yes"
|
|
96
|
+
else
|
|
97
|
+
# If not auto, we assume manual inputs or interactive (which doesn't work in CI usually, unless with inputs)
|
|
98
|
+
# For CI action, we default to --all if mode is bump
|
|
99
|
+
ARGS="--all --yes"
|
|
100
|
+
fi
|
|
101
|
+
|
|
102
|
+
if [ -n "$CLI_PATH" ]; then
|
|
103
|
+
bun run $CLI_PATH version bump $ARGS
|
|
104
|
+
bun run $CLI_PATH changelog generate
|
|
105
|
+
else
|
|
106
|
+
bunx @lssm/app.cli-contractspec version bump $ARGS
|
|
107
|
+
bunx @lssm/app.cli-contractspec changelog generate
|
|
108
|
+
fi
|
|
109
|
+
|
|
110
|
+
- name: Create Pull Request
|
|
111
|
+
if: ${{ inputs.mode == 'bump' && inputs.create-pr == 'true' }}
|
|
112
|
+
shell: bash
|
|
113
|
+
env:
|
|
114
|
+
GH_TOKEN: ${{ inputs.github-token }}
|
|
115
|
+
run: |
|
|
116
|
+
git checkout -b ${{ inputs.pr-branch }}
|
|
117
|
+
git add .
|
|
118
|
+
git commit -m "${{ inputs.commit-message }}" || echo "No changes to commit"
|
|
119
|
+
git push origin ${{ inputs.pr-branch }} --force
|
|
120
|
+
gh pr create --title "${{ inputs.pr-title }}" --body "Automated version bumps generated by ContractSpec." --base main --head ${{ inputs.pr-branch }} || echo "PR already exists"
|
|
121
|
+
|
|
122
|
+
- name: Commit Direct
|
|
123
|
+
if: ${{ inputs.mode == 'bump' && inputs.create-pr == 'false' }}
|
|
124
|
+
shell: bash
|
|
125
|
+
run: |
|
|
126
|
+
git add .
|
|
127
|
+
git commit -m "${{ inputs.commit-message }}" || echo "No changes to commit"
|
|
128
|
+
git push origin HEAD
|
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@contractspec/action.version",
|
|
3
|
+
"version": "0.16.0",
|
|
4
|
+
"description": "GitHub Action for ContractSpec version management",
|
|
5
|
+
"main": "action.yml",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"github-action",
|
|
8
|
+
"contractspec",
|
|
9
|
+
"versioning",
|
|
10
|
+
"changelog"
|
|
11
|
+
],
|
|
12
|
+
"author": "LSSM",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"registry": "https://registry.npmjs.org/",
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://contractspec.io"
|
|
19
|
+
}
|