Skip to content

Commit a87190e

Browse files
chore: lint:fix
1 parent f26d473 commit a87190e

6 files changed

Lines changed: 100 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Changelog
2+
23
[Compare changes](https://github.com/stacksjs/bumpx/compare/v0.2.4...v0.2.5)
34

45
### 🚀 Features

docs/advanced/ci-cd-integration.md

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ bumpx patch --ci
2020
### CI Mode Behavior
2121

2222
When `--ci` is enabled:
23+
2324
- Confirmation prompts are skipped (`--yes`)
2425
- Output is minimized (`--quiet`)
2526
- Interactive features are disabled
@@ -40,6 +41,7 @@ on:
4041
default: 'patch'
4142
type: choice
4243
options:
44+
4345
- patch
4446
- minor
4547
- major
@@ -54,23 +56,29 @@ jobs:
5456
contents: write
5557

5658
steps:
59+
5760
- uses: actions/checkout@v4
61+
5862
with:
5963
fetch-depth: 0
6064
token: ${{ secrets.GITHUB_TOKEN }}
6165

6266
- name: Setup Bun
67+
6368
uses: oven-sh/setup-bun@v1
6469

6570
- name: Configure Git
71+
6672
run: |
6773
git config user.name "github-actions[bot]"
6874
git config user.email "github-actions[bot]@users.noreply.github.com"
6975
7076
- name: Install bumpx
77+
7178
run: bun add -g @stacksjs/bumpx
7279

7380
- name: Version bump
81+
7482
run: bumpx ${{ inputs.version }} --commit --tag --push --ci
7583
```
7684
@@ -83,6 +91,7 @@ on:
8391
push:
8492
branches: [main]
8593
paths-ignore:
94+
8695
- '*.md'
8796
- 'docs/**'
8897

@@ -94,15 +103,18 @@ jobs:
94103
release_type: ${{ steps.check.outputs.release_type }}
95104

96105
steps:
106+
97107
- uses: actions/checkout@v4
108+
98109
with:
99110
fetch-depth: 0
100111

101112
- name: Check for release trigger
113+
102114
id: check
103115
run: |
104116
COMMIT_MSG=$(git log -1 --pretty=%B)
105-
if [[ "$COMMIT_MSG" == *"[release:"* ]]; then
117+
if [[ "$COMMIT_MSG" == _"[release:"_ ]]; then
106118
TYPE=$(echo "$COMMIT_MSG" | grep -oP '\[release:\s*\K[^\]]+')
107119
echo "should_release=true" >> $GITHUB_OUTPUT
108120
echo "release_type=$TYPE" >> $GITHUB_OUTPUT
@@ -118,19 +130,23 @@ jobs:
118130
contents: write
119131

120132
steps:
133+
121134
- uses: actions/checkout@v4
135+
122136
with:
123137
fetch-depth: 0
124138
token: ${{ secrets.GITHUB_TOKEN }}
125139

126140
- uses: oven-sh/setup-bun@v1
127141

128142
- name: Configure Git
143+
129144
run: |
130145
git config user.name "github-actions[bot]"
131146
git config user.email "github-actions[bot]@users.noreply.github.com"
132147
133148
- name: Release
149+
134150
run: |
135151
bun add -g @stacksjs/bumpx
136152
bumpx ${{ needs.check-release.outputs.release_type }} \
@@ -153,21 +169,26 @@ jobs:
153169
release:
154170
runs-on: ubuntu-latest
155171
steps:
172+
156173
- uses: actions/checkout@v4
174+
157175
with:
158176
fetch-depth: 0
159177

160178
- uses: oven-sh/setup-bun@v1
161179

162180
- name: Install dependencies
181+
163182
run: bun install
164183

165184
- name: Configure Git
185+
166186
run: |
167187
git config user.name "github-actions[bot]"
168188
git config user.email "github-actions[bot]@users.noreply.github.com"
169189
170190
- name: Version bump and build
191+
171192
run: |
172193
bun add -g @stacksjs/bumpx
173194
bumpx ${{ inputs.version }} \
@@ -178,11 +199,13 @@ jobs:
178199
--ci
179200
180201
- name: Publish to npm
202+
181203
run: npm publish
182204
env:
183205
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
184206

185207
- name: Create GitHub Release
208+
186209
run: |
187210
VERSION=$(jq -r .version package.json)
188211
gh release create "v$VERSION" \
@@ -211,18 +234,22 @@ jobs:
211234
release:
212235
runs-on: ubuntu-latest
213236
steps:
237+
214238
- uses: actions/checkout@v4
239+
215240
with:
216241
fetch-depth: 0
217242

218243
- uses: oven-sh/setup-bun@v1
219244

220245
- name: Configure Git
246+
221247
run: |
222248
git config user.name "github-actions[bot]"
223249
git config user.email "github-actions[bot]@users.noreply.github.com"
224250
225251
- name: Release all packages
252+
226253
if: inputs.package == 'all'
227254
run: |
228255
bun add -g @stacksjs/bumpx
@@ -234,6 +261,7 @@ jobs:
234261
--ci
235262
236263
- name: Release single package
264+
237265
if: inputs.package != 'all'
238266
run: |
239267
bun add -g @stacksjs/bumpx
@@ -252,21 +280,26 @@ jobs:
252280
```yaml
253281
# .gitlab-ci.yml
254282
stages:
283+
255284
- release
256285

257286
release:
258287
stage: release
259288
image: oven/bun:latest
260289
only:
290+
261291
- triggers
292+
262293
variables:
263294
VERSION_TYPE: patch
264295
script:
296+
265297
- git config user.name "GitLab CI"
266298
- git config user.email "ci@gitlab.com"
267299
- bun add -g @stacksjs/bumpx
268300
- bumpx $VERSION_TYPE --commit --tag --ci
269301
- git push origin HEAD:$CI_COMMIT_REF_NAME --tags
302+
270303
```
271304

272305
### Scheduled Release
@@ -275,13 +308,17 @@ release:
275308
release:scheduled:
276309
stage: release
277310
only:
311+
278312
- schedules
313+
279314
script:
315+
280316
- git config user.name "GitLab CI"
281317
- git config user.email "ci@gitlab.com"
282318
- bun add -g @stacksjs/bumpx
283319
- |
284-
# Check for changes since last tag
320+
321+
# Check for changes since last tag
285322
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
286323
if [ -n "$LAST_TAG" ]; then
287324
CHANGES=$(git log $LAST_TAG..HEAD --oneline | wc -l)
@@ -302,15 +339,21 @@ version: 2.1
302339
jobs:
303340
release:
304341
docker:
342+
305343
- image: oven/bun:latest
344+
306345
steps:
346+
307347
- checkout
308348
- run:
349+
309350
name: Configure Git
310351
command: |
311352
git config user.name "CircleCI"
312353
git config user.email "ci@circleci.com"
354+
313355
- run:
356+
314357
name: Release
315358
command: |
316359
bun add -g @stacksjs/bumpx
@@ -319,7 +362,9 @@ jobs:
319362
workflows:
320363
release:
321364
jobs:
365+
322366
- release:
367+
323368
filters:
324369
branches:
325370
only: main
@@ -362,10 +407,13 @@ pipeline {
362407
trigger: none
363408
364409
parameters:
410+
365411
- name: versionType
412+
366413
type: string
367414
default: patch
368415
values:
416+
369417
- patch
370418
- minor
371419
- major
@@ -374,16 +422,20 @@ pool:
374422
vmImage: ubuntu-latest
375423
376424
steps:
425+
377426
- task: UseNode@1
427+
378428
inputs:
379429
version: '20.x'
380430

381431
- script: |
432+
382433
npm install -g bun
383434
bun add -g @stacksjs/bumpx
384435
displayName: Install tools
385436
386437
- script: |
438+
387439
git config user.name "Azure Pipelines"
388440
git config user.email "ci@azure.com"
389441
bumpx ${{ parameters.versionType }} --commit --tag --push --ci
@@ -425,7 +477,9 @@ permissions:
425477
426478
```yaml
427479
# Use a PAT or GitHub App for protected branches
480+
428481
- uses: actions/checkout@v4
482+
429483
with:
430484
token: ${{ secrets.RELEASE_TOKEN }} # PAT with push access
431485
```
@@ -434,13 +488,16 @@ permissions:
434488
435489
```yaml
436490
# GPG signing in CI
491+
437492
- name: Import GPG key
493+
438494
run: |
439495
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --import
440496
git config user.signingkey ${{ secrets.GPG_KEY_ID }}
441497
git config commit.gpgsign true
442498
443499
- name: Release with signing
500+
444501
run: bumpx patch --commit --tag --push --sign --ci
445502
```
446503

docs/advanced/custom-scripts.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,14 @@ export default defineConfig({
5050
Commands execute before commit/tag:
5151

5252
```
53+
5354
1. Version bump in files
5455
2. Execute commands <-- here
5556
3. Git add (if --all)
5657
4. Git commit
5758
5. Git tag
5859
6. Git push
60+
5961
```
6062

6163
This ensures built artifacts are included in the commit.
@@ -347,7 +349,9 @@ notifyRelease()
347349
### GitHub Actions Script
348350

349351
```yaml
352+
350353
- name: Release
354+
351355
run: |
352356
bumpx ${{ inputs.version_type }} \
353357
--execute "bun run build && bun run test" \

docs/advanced/performance.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,16 @@ For very large files:
154154
Cache bumpx for faster CI runs:
155155

156156
```yaml
157+
157158
- name: Cache bumpx
159+
158160
uses: actions/cache@v3
159161
with:
160162
path: ~/.bun/bin/bumpx
161163
key: bumpx-${{ runner.os }}
162164

163165
- name: Install bumpx
166+
164167
run: |
165168
if [ ! -f ~/.bun/bin/bumpx ]; then
166169
bun add -g @stacksjs/bumpx
@@ -170,7 +173,9 @@ Cache bumpx for faster CI runs:
170173
### Optimized CI Configuration
171174
172175
```yaml
176+
173177
- name: Fast version bump
178+
174179
run: |
175180
bumpx ${{ inputs.version }} \
176181
--ci \
@@ -191,7 +196,9 @@ jobs:
191196
outputs:
192197
version: ${{ steps.bump.outputs.version }}
193198
steps:
199+
194200
- name: Bump version
201+
195202
id: bump
196203
run: |
197204
bumpx patch --commit --tag
@@ -201,14 +208,18 @@ jobs:
201208
needs: bump
202209
runs-on: ubuntu-latest
203210
steps:
211+
204212
- name: Build with new version
213+
205214
run: bun run build
206215

207216
test:
208217
needs: bump
209218
runs-on: ubuntu-latest
210219
steps:
220+
211221
- name: Run tests
222+
212223
run: bun test
213224
```
214225

0 commit comments

Comments
 (0)