Skip to content

Commit 00c1925

Browse files
cmaurerclaude
andcommitted
feat(ci): add pre-release stage for feature branches
- Add pre-release job that runs on feature/* branches (not master) - Update .releaserc.json to specifically match feature/* branches - Prereleases strip 'feature/' prefix from version identifier - Example: feature/foo creates 1.2.0-foo.1 on 'next' npm channel 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 75f1f03 commit 00c1925

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/node.js.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
uses: coverallsapp/github-action@v2
5252
with:
5353
parallel-finished: true
54+
5455
pre-release:
5556
needs: build
5657
if: github.event_name == 'push' && github.ref != 'refs/heads/master'
@@ -70,11 +71,12 @@ jobs:
7071
cache: 'npm'
7172
- name: Install dependencies
7273
run: npm ci --ignore-scripts
73-
- name: Run semantic-release
74-
run: npx semantic-release --dry-run --ci
74+
- name: Run semantic-release (prerelease)
75+
run: npx semantic-release
7576
env:
7677
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7778
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
79+
7880
release:
7981
needs: build
8082
if: github.event_name == 'push' && github.ref == 'refs/heads/master'

.releaserc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"branches": [
33
"master",
44
{
5-
"name": "*",
6-
"prerelease": "${name.replace(/[^a-zA-Z0-9]/g, '-')}",
5+
"name": "feature/*",
6+
"prerelease": "${name.replace(/^feature\\//g, '').replace(/[^a-zA-Z0-9]/g, '-')}",
77
"channel": "next"
88
}
99
],

0 commit comments

Comments
 (0)