diff --git a/.github/actions/release-macos-x86_64/action.yml b/.github/actions/release-macos-x86_64/action.yml
index 25244cf4..cae846a1 100644
--- a/.github/actions/release-macos-x86_64/action.yml
+++ b/.github/actions/release-macos-x86_64/action.yml
@@ -82,3 +82,19 @@ runs:
if-no-files-found: error
retention-days: 7
overwrite: true
+
+ # The media module's natives go the same way. Only the classifier jar: the
+ # main jar is platform independent and publish-central builds it itself. The
+ # name matches publish-central's natives-* download pattern, which merges
+ # both uploads into one flat directory.
+ - name: Upload media native library jar
+ uses: actions/upload-artifact@v7
+ with:
+ name: natives-media-${{ inputs.platform-name }}
+ path: |
+ webrtc-java-media/target/webrtc-java-media-*-windows-*.jar
+ webrtc-java-media/target/webrtc-java-media-*-linux-*.jar
+ webrtc-java-media/target/webrtc-java-media-*-macos-*.jar
+ if-no-files-found: error
+ retention-days: 7
+ overwrite: true
diff --git a/.github/actions/release/action.yml b/.github/actions/release/action.yml
index fc4a5a6b..460b365d 100644
--- a/.github/actions/release/action.yml
+++ b/.github/actions/release/action.yml
@@ -78,3 +78,19 @@ runs:
if-no-files-found: error
retention-days: 7
overwrite: true
+
+ # The media module's natives go the same way. Only the classifier jar: the
+ # main jar is platform independent and publish-central builds it itself. The
+ # name matches publish-central's natives-* download pattern, which merges
+ # both uploads into one flat directory.
+ - name: Upload media native library jar
+ uses: actions/upload-artifact@v7
+ with:
+ name: natives-media-${{ inputs.platform-name }}
+ path: |
+ webrtc-java-media/target/webrtc-java-media-*-windows-*.jar
+ webrtc-java-media/target/webrtc-java-media-*-linux-*.jar
+ webrtc-java-media/target/webrtc-java-media-*-macos-*.jar
+ if-no-files-found: error
+ retention-days: 7
+ overwrite: true
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 2ee8ba10..5b62d411 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -95,10 +95,13 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
+ # release:prepare runs "clean verify" over the whole reactor, and the media
+ # module in it builds FFmpeg from its third-party submodule.
- name: Update development version
uses: actions/checkout@v6
with:
ref: main
+ submodules: true
# A dry run transforms the poms and writes release.properties, but creates no
# commit and no tag, so there is nothing to amend or push below.
@@ -328,6 +331,10 @@ jobs:
echo "::error::Missing native library jar for $classifier"
status=1
fi
+ if [ ! -f "natives/webrtc-java-media-$version-$classifier.jar" ]; then
+ echo "::error::Missing media native library jar for $classifier"
+ status=1
+ fi
done
exit $status
@@ -360,7 +367,7 @@ jobs:
MAVEN_TOKEN: ${{ inputs.dryRun && 'dry-run-must-not-upload' || secrets.MAVEN_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
run: >
- mvn -B deploy -pl .,webrtc -Prelease -DskipTests
+ mvn -B deploy -pl .,webrtc,webrtc-java-media -Prelease -DskipTests
-Dnatives.dir="$PWD/natives"
-DskipPublishing=${{ inputs.dryRun }}
@@ -374,7 +381,9 @@ jobs:
echo
echo "Artifacts destined for the deployment bundle:"
echo '```'
- ls -1 webrtc/target/*.jar webrtc/target/*.asc natives/*.asc 2>/dev/null || true
+ ls -1 webrtc/target/*.jar webrtc/target/*.asc \
+ webrtc-java-media/target/*.jar webrtc-java-media/target/*.asc \
+ natives/*.asc 2>/dev/null || true
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
@@ -388,6 +397,9 @@ jobs:
webrtc/target/central-*/**
webrtc/target/*.jar
webrtc/target/*.asc
+ webrtc-java-media/target/central-*/**
+ webrtc-java-media/target/*.jar
+ webrtc-java-media/target/*.asc
natives/*.asc
if-no-files-found: warn
retention-days: 7
diff --git a/docs/guide/media/media-files.md b/docs/guide/media/media-files.md
index c0fc63b8..c518c6cd 100644
--- a/docs/guide/media/media-files.md
+++ b/docs/guide/media/media-files.md
@@ -37,12 +37,12 @@ Once installed, depend on it alongside `webrtc-java`. It takes two entries: one
dev.onvoid.webrtc
webrtc-java-media
- 0.19.0-SNAPSHOT
+ {{ VERSION }}
dev.onvoid.webrtc
webrtc-java-media
- 0.19.0-SNAPSHOT
+ {{ VERSION }}
windows-x86_64
```
diff --git a/webrtc-java-media/pom.xml b/webrtc-java-media/pom.xml
index 4e33fd74..e005a330 100644
--- a/webrtc-java-media/pom.xml
+++ b/webrtc-java-media/pom.xml
@@ -203,6 +203,92 @@
+
+
+ attach-natives-all
+
+
+ natives.dir
+
+
+
+ none
+ none
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+ natives-jar
+ none
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+
+
+ attach-natives
+ package
+
+ attach-artifact
+
+
+
+
+ ${natives.dir}/${project.artifactId}-${project.version}-windows-x86_64.jar
+ jar
+ windows-x86_64
+
+
+ ${natives.dir}/${project.artifactId}-${project.version}-windows-aarch64.jar
+ jar
+ windows-aarch64
+
+
+ ${natives.dir}/${project.artifactId}-${project.version}-linux-x86_64.jar
+ jar
+ linux-x86_64
+
+
+ ${natives.dir}/${project.artifactId}-${project.version}-linux-aarch64.jar
+ jar
+ linux-aarch64
+
+
+ ${natives.dir}/${project.artifactId}-${project.version}-linux-aarch32.jar
+ jar
+ linux-aarch32
+
+
+ ${natives.dir}/${project.artifactId}-${project.version}-macos-x86_64.jar
+ jar
+ macos-x86_64
+
+
+ ${natives.dir}/${project.artifactId}-${project.version}-macos-aarch64.jar
+ jar
+ macos-aarch64
+
+
+
+
+
+
+
+
+
+
diff --git a/webrtc/pom.xml b/webrtc/pom.xml
index 4c64f822..8f959f13 100644
--- a/webrtc/pom.xml
+++ b/webrtc/pom.xml
@@ -125,7 +125,7 @@
build jobs. Maven Central publishes a version as one atomic bundle, hence
all classifiers must be attached to a single deployment.
- Run with: mvn deploy -pl .,webrtc -Prelease -Dnatives.dir=/abs/path
+ Run with: mvn deploy -pl .,webrtc,webrtc-java-media -Prelease -Dnatives.dir=/abs/path
-->
attach-natives-all