Skip to content

Commit ceb7576

Browse files
author
rahul-infra
committed
made changes in preview.yaml file.
1 parent 44f2861 commit ceb7576

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

.github/workflows/release-preview.yaml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,37 +34,36 @@ jobs:
3434
with:
3535
node-version: 'lts/*'
3636

37-
- name: Install semantic-release
37+
- name: Update config for preview
3838
run: |
39-
npm install --save-dev semantic-release@18.0.0 \
40-
@semantic-release/commit-analyzer@9.0.2 \
41-
@semantic-release/release-notes-generator@10.0.3 \
42-
conventional-changelog-conventionalcommits@4.6.3
39+
# Backup original config
40+
cp .releaserc.json .releaserc.json.bak
4341
44-
- name: Create preview config
45-
run: |
46-
# Create a config without GitHub plugin for preview (avoids token validation)
47-
cat > .releaserc.preview.json << 'EOF'
42+
# Update config for preview mode (branch is main since we merged in previous step)
43+
cat > .releaserc.json << 'EOF'
4844
{
4945
"branches": ["main"],
46+
"debug": true,
47+
"ci": false,
48+
"dryRun": true,
5049
"plugins": [
5150
"@semantic-release/commit-analyzer",
52-
"@semantic-release/release-notes-generator"
51+
"@semantic-release/release-notes-generator",
52+
"@semantic-release/github"
5353
]
5454
}
5555
EOF
5656
5757
- name: Run semantic-release (dry-run)
5858
id: semantic
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5961
run: |
60-
# Temporarily rename main config to use preview config only
61-
mv .releaserc.json .releaserc.json.bak
62-
63-
# Run semantic-release in dry-run mode with preview config only
64-
OUTPUT=$(npx semantic-release --extends ./.releaserc.preview.json --dry-run --no-ci 2>&1 || true)
62+
# Run semantic-release with inline package installation (same as your local command)
63+
OUTPUT=$(npx --package semantic-release --package @semantic-release/exec --package conventional-changelog-conventionalcommits semantic-release 2>&1 || true)
6564
echo "$OUTPUT"
6665
67-
# Restore main config
66+
# Restore original config
6867
mv .releaserc.json.bak .releaserc.json
6968
7069
# Extract version information

0 commit comments

Comments
 (0)