From 6f120661863ebc45a0520556ce0927761ad8b66b Mon Sep 17 00:00:00 2001 From: Alex Andres Date: Sun, 27 Sep 2026 13:43:11 +0200 Subject: [PATCH 1/3] ci: check out the FFmpeg submodule before preparing a release release:prepare runs "clean verify" over the whole reactor, which now includes the media module. Its CMake configure stops when the FFmpeg submodule is missing, and the prepare-release job never checked it out, so the release failed before any commit or tag was made. --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ee8ba10..8075726a 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. From 9ed66541d07641589240ad92919d53c0946fb9ad Mon Sep 17 00:00:00 2001 From: Alex Andres Date: Sun, 27 Sep 2026 13:48:55 +0200 Subject: [PATCH 2/3] build: publish the media module with a release The media module became part of the normal build, and snapshot builds deploy it, but the release workflow never learned about it: the release jobs uploaded only webrtc-jni's natives, and publish-central deployed only the parent and webrtc. A release would have shipped without the artifact the media guide tells applications to depend on. The release jobs now also upload the media module's classifier jar, under a name the natives-* download already merges into the same flat directory. publish-central checks that every platform's media jar is there and deploys the module alongside webrtc. The media module gets the attach-natives-all profile webrtc already has, activated the same way by natives.dir. It attaches the seven downloaded jars and turns off the CMake build and the host natives jar, so publish-central neither needs the FFmpeg submodule nor builds a second, host-only natives jar. --- .../actions/release-macos-x86_64/action.yml | 16 ++++ .github/actions/release/action.yml | 16 ++++ .github/workflows/release.yml | 13 ++- webrtc-java-media/pom.xml | 86 +++++++++++++++++++ webrtc/pom.xml | 2 +- 5 files changed, 130 insertions(+), 3 deletions(-) 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 8075726a..5b62d411 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -331,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 @@ -363,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 }} @@ -377,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" @@ -391,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/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 From d93b77190b32f18c16280baaf5a214ec4f2a086b Mon Sep 17 00:00:00 2001 From: Alex Andres Date: Sun, 27 Sep 2026 13:48:59 +0200 Subject: [PATCH 3/3] docs: take the media module's version from the release variables The media guide spelled out 0.19.0-SNAPSHOT, which stops resolving once 0.19.0 is released and the snapshot moves on. It now uses {{ VERSION }} like the get-started guide, which the release workflow keeps current. --- docs/guide/media/media-files.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ```