Skip to content

Commit

Permalink
GH-476: Assemble Zip for Javadocs
Browse files Browse the repository at this point in the history
Fixes: #476

* Add `maven-assembly-plugin` to Zip Javadocs from the `apidocs` dir into a `*-docs.zip` artifact
* Modify `build-and-deploy-snapshot.yml` and `release.yml` to assign `zip.deployed=false` attribute to Zip artifacts
* Also mark `docs.zip` files as `zip.type=docs`
  • Loading branch information
artembilan committed Nov 20, 2024
1 parent ed9861d commit 78bd8d2
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-and-deploy-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
folder: 'deployment-repository'
signing-key: ${{ secrets.GPG_PRIVATE_KEY }}
signing-passphrase: ${{ secrets.GPG_PASSPHRASE }}
artifact-properties: |
/**/*.zip::zip.name=${{ github.event.repository.name }},zip.deployed=false
/**/*docs.zip::zip.type=docs
- name: Send Notification
uses: ./.github/actions/send-notification
if: always()
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
folder: 'deployment-repository'
signing-key: ${{ secrets.GPG_PRIVATE_KEY }}
signing-passphrase: ${{ secrets.GPG_PASSPHRASE }}
artifact-properties: |
/**/*.zip::zip.name=${{ github.event.repository.name }},zip.deployed=false
/**/*docs.zip::zip.type=docs
outputs:
version: ${{ steps.build-and-publish.outputs.version }}
sync-to-maven-central:
Expand Down
30 changes: 30 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,36 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.1</version>
<configuration>
<inlineDescriptors>
<inlineDescriptor>
<id>docs</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${project.build.directory}/reports/apidocs</directory>
<outputDirectory>/apidocs</outputDirectory>
</fileSet>
</fileSets>
</inlineDescriptor>
</inlineDescriptors>
</configuration>
<executions>
<execution>
<id>docs-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 78bd8d2

Please sign in to comment.