Skip to content

Commit 6957acc

Browse files
committed
Refactor Maven publish workflow to create a structured temporary directory for bundling files, ensuring proper Maven repository layout in the ZIP file.
1 parent 1f23549 commit 6957acc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/maven-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ jobs:
114114
# Create the bundle ZIP file (Sonatype Central accepts ZIP files)
115115
BUNDLE_FILE="bundle.zip"
116116
117-
# Create a temporary directory and copy files there to ensure clean paths
118-
mkdir -p temp_bundle
119-
cp "${FILES[@]}" temp_bundle/
117+
# Create Maven repository structure in temporary directory
118+
mkdir -p temp_bundle/${PACKAGE_PATH}/${ARTIFACT}/${VERSION}
119+
cp "${FILES[@]}" temp_bundle/${PACKAGE_PATH}/${ARTIFACT}/${VERSION}/
120120
cd temp_bundle
121121
122-
# Create ZIP from within the temp directory to avoid path prefixes
122+
# Create ZIP with proper Maven repository structure
123123
zip -r ../${BUNDLE_FILE} .
124124
cd ..
125125

0 commit comments

Comments
 (0)