Skip to content

Commit b44817b

Browse files
committed
fix: correct parallel publishing configuration for GitHub Packages
- Fix npm-multiple plugin configuration to use proper pkgRoot for GitHub registry - Ensure dist-github directory contains complete package structure with scoped package.json - Copy build artifacts and metadata files to GitHub Packages directory - Remove conflicting @semantic-release/exec plugin that was causing publish failures - Properly configure .npmrc with authentication for both registries This resolves the publishing failures and enables successful dual registry publishing to both npmjs.org and GitHub Packages with proper scoped package naming.
1 parent 68ab9b8 commit b44817b

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -348,15 +348,19 @@ jobs:
348348
echo "ℹ️ No README changes to stage"
349349
fi
350350
351-
- name: Prepare GitHub Packages package.json
351+
- name: Prepare GitHub Packages publishing
352352
run: |
353353
echo "📦 Preparing package configuration for GitHub Packages..."
354354
355-
# Create dist-github directory
355+
# Create dist-github directory and copy build artifacts
356356
mkdir -p dist-github
357+
cp -r dist/* dist-github/
357358
358359
# Create a scoped package.json for GitHub Packages
359-
jq '.name = "@exadev/markmv" | .publishConfig.registry = "https://npm.pkg.github.com"' package.json > package-github.json
360+
jq '.name = "@exadev/markmv" | .publishConfig.registry = "https://npm.pkg.github.com"' package.json > dist-github/package.json
361+
362+
# Copy other required files to dist-github
363+
cp README.md CHANGELOG.md LICENSE dist-github/ 2>/dev/null || true
360364
361365
echo "✅ GitHub Packages configuration prepared"
362366
@@ -381,9 +385,6 @@ jobs:
381385
@exadev:registry=https://npm.pkg.github.com
382386
EOF
383387
384-
# Copy the GitHub-scoped package.json to the directory
385-
cp package-github.json dist-github/package.json
386-
387388
npm run release
388389
echo "✅ Release completed - packages published to both NPM and GitHub Packages"
389390

.releaserc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"github": {
5858
"npmPublish": true,
5959
"tarballDir": "dist-github",
60-
"pkgRoot": "./",
60+
"pkgRoot": "dist-github",
6161
"provenance": true,
6262
"addChannel": false
6363
}

0 commit comments

Comments
 (0)