2 Commits

Author SHA1 Message Date
c5b2e6f286 Release v0.0.11 - Fix ES module bundling issues
- Separated server-side and client-safe exports
- Main export now contains only types to prevent bundling server code
- Updated documentation with new import structure

🤖 Generated with [Claude Code](https://claude.ai/code)
2025-08-31 18:09:52 +02:00
7cf102e0b9 Fix GitHub workflow to properly detect version changes
The workflow now detects version changes by:
1. Looking for version bump commits (created by npm version)
2. Checking if package.json was modified and version actually changed

This works with the npm version workflow where:
1. Make changes and commit them
2. Run npm version patch (creates version commit)
3. Push both commits - workflow publishes on version commit
2025-08-31 18:08:15 +02:00
3 changed files with 22 additions and 13 deletions

View File

@@ -35,25 +35,34 @@ jobs:
- name: Build
run: pnpm build
- name: Check if version changed
- name: Check if should publish
id: version-check
run: |
# Get current version from package.json
CURRENT_VERSION=$(node -p "require('./package.json').version")
# Get previous commit's version
git show HEAD~1:package.json > prev-package.json 2>/dev/null || echo '{"version":"0.0.0"}' > prev-package.json
PREVIOUS_VERSION=$(node -p "require('./prev-package.json').version")
echo "current=$CURRENT_VERSION" >> $GITHUB_OUTPUT
echo "previous=$PREVIOUS_VERSION" >> $GITHUB_OUTPUT
if [ "$CURRENT_VERSION" != "$PREVIOUS_VERSION" ]; then
# Check if this is a version bump commit (created by npm version)
COMMIT_MSG=$(git log -1 --pretty=%B)
if echo "$COMMIT_MSG" | grep -q "^v[0-9]"; then
echo "changed=true" >> $GITHUB_OUTPUT
echo "Version changed from $PREVIOUS_VERSION to $CURRENT_VERSION"
echo "Version bump commit detected: $COMMIT_MSG"
# Or check if package.json was modified in this commit
elif git diff --name-only HEAD~1 HEAD | grep -q "package.json"; then
# Check if the version actually changed
git show HEAD~1:package.json > prev-package.json 2>/dev/null || echo '{"version":"0.0.0"}' > prev-package.json
PREVIOUS_VERSION=$(node -p "require('./prev-package.json').version")
if [ "$CURRENT_VERSION" != "$PREVIOUS_VERSION" ]; then
echo "changed=true" >> $GITHUB_OUTPUT
echo "Version changed from $PREVIOUS_VERSION to $CURRENT_VERSION"
else
echo "changed=false" >> $GITHUB_OUTPUT
echo "package.json modified but version unchanged: $CURRENT_VERSION"
fi
else
echo "changed=false" >> $GITHUB_OUTPUT
echo "Version unchanged: $CURRENT_VERSION"
echo "No version change detected"
fi
- name: Publish to NPM

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@xtr-dev/payload-workflows",
"version": "0.0.10",
"version": "0.0.11",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@xtr-dev/payload-workflows",
"version": "0.0.10",
"version": "0.0.11",
"license": "MIT",
"dependencies": {
"jsonpath-plus": "^10.3.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@xtr-dev/payload-automation",
"version": "0.0.10",
"version": "0.0.11",
"description": "PayloadCMS Automation Plugin - Comprehensive workflow automation system with visual workflow building, execution tracking, and step types",
"license": "MIT",
"type": "module",