Compare commits
6 Commits
abacus-rea
...
abacus-rea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
342bff739a | ||
|
|
5e6c901f73 | ||
|
|
127cebab69 | ||
|
|
11fd6f9b3d | ||
|
|
de4c03e6b2 | ||
|
|
834b062b2d |
55
.github/workflows/publish-abacus-react.yml
vendored
55
.github/workflows/publish-abacus-react.yml
vendored
@@ -83,8 +83,59 @@ jobs:
|
||||
LATEST_TAG=$(git tag --list "abacus-react-v*" | sort -V | tail -1)
|
||||
VERSION=${LATEST_TAG#abacus-react-v}
|
||||
echo "Publishing version: $VERSION"
|
||||
npm version $VERSION --no-git-tag-version --allow-same-version
|
||||
npm publish
|
||||
|
||||
# Create a clean package.json for publishing by updating version and cleaning workspace references
|
||||
node -e "
|
||||
const fs = require('fs');
|
||||
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
|
||||
|
||||
// Set the correct version
|
||||
pkg.version = '$VERSION';
|
||||
|
||||
// Clean workspace dependencies function
|
||||
const cleanWorkspaceDeps = (deps) => {
|
||||
if (!deps) return deps;
|
||||
const result = {};
|
||||
for (const [name, version] of Object.entries(deps)) {
|
||||
if (typeof version === 'string' && version.startsWith('workspace:')) {
|
||||
// Replace workspace: syntax with actual version or latest
|
||||
result[name] = version.replace('workspace:', '') || '*';
|
||||
} else {
|
||||
result[name] = version;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
// Clean all dependency types
|
||||
if (pkg.dependencies) pkg.dependencies = cleanWorkspaceDeps(pkg.dependencies);
|
||||
if (pkg.devDependencies) pkg.devDependencies = cleanWorkspaceDeps(pkg.devDependencies);
|
||||
if (pkg.peerDependencies) pkg.peerDependencies = cleanWorkspaceDeps(pkg.peerDependencies);
|
||||
if (pkg.optionalDependencies) pkg.optionalDependencies = cleanWorkspaceDeps(pkg.optionalDependencies);
|
||||
|
||||
// Set publishConfig for GitHub Packages
|
||||
pkg.publishConfig = {
|
||||
access: 'public',
|
||||
registry: 'https://npm.pkg.github.com'
|
||||
};
|
||||
|
||||
// Write the clean package.json
|
||||
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2));
|
||||
console.log('Created clean package.json for version:', pkg.version);
|
||||
"
|
||||
|
||||
# Verify the package.json is clean
|
||||
echo "Package.json version: $(node -e "console.log(JSON.parse(require('fs').readFileSync('package.json', 'utf8')).version)")"
|
||||
|
||||
# Check for any remaining workspace dependencies
|
||||
if grep -q "workspace:" package.json; then
|
||||
echo "ERROR: Still found workspace dependencies in package.json:"
|
||||
grep "workspace:" package.json
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Explicitly set registry for this publish command
|
||||
npm publish --registry=https://npm.pkg.github.com
|
||||
else
|
||||
echo "No new abacus-react version tag found, skipping publish"
|
||||
fi
|
||||
@@ -1,3 +1,24 @@
|
||||
## [1.1.3](https://github.com/antialias/soroban-abacus-flashcards/compare/abacus-react-v1.1.2...abacus-react-v1.1.3) (2025-09-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **abacus-react:** force npm to use GitHub Packages registry ([5e6c901](https://github.com/antialias/soroban-abacus-flashcards/commit/5e6c901f73a68b60ec05f19c4a991ca8affc1589))
|
||||
|
||||
## [1.1.2](https://github.com/antialias/soroban-abacus-flashcards/compare/abacus-react-v1.1.1...abacus-react-v1.1.2) (2025-09-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **abacus-react:** improve workspace dependency cleanup and add validation ([11fd6f9](https://github.com/antialias/soroban-abacus-flashcards/commit/11fd6f9b3deb1122d3788a7e0698de891eeb0f3a))
|
||||
|
||||
## [1.1.1](https://github.com/antialias/soroban-abacus-flashcards/compare/abacus-react-v1.1.0...abacus-react-v1.1.1) (2025-09-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **abacus-react:** resolve workspace dependencies before npm publish ([834b062](https://github.com/antialias/soroban-abacus-flashcards/commit/834b062b2d22356b9d96bb9c3c444eccaa51d793))
|
||||
|
||||
# [1.1.0](https://github.com/antialias/soroban-abacus-flashcards/compare/abacus-react-v1.0.0...abacus-react-v1.1.0) (2025-09-28)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user