Skip to content

Commit 563a7c2

Browse files
committed
chore(cicd): use Maven plugin again
1 parent 08573bd commit 563a7c2

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ jobs:
9191
mvn clean install -pl '!tensorflow-framework' -B -U -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }}
9292
- name: Deploy native artifact
9393
if: env.DEPLOY_RELEASE == 'true' || env.DEPLOY_SNAPSHOT == 'true'
94-
run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }}
94+
# run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }}
95+
run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }}
9596
linux-x86_64:
9697
runs-on: ubuntu-22.04
9798
needs: prepare
@@ -114,7 +115,8 @@ jobs:
114115
mvn clean install -pl '!tensorflow-framework' -B -U -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }}
115116
- name: Deploy native artifact
116117
if: env.DEPLOY_RELEASE == 'true' || env.DEPLOY_SNAPSHOT == 'true'
117-
run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }}
118+
# run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }}
119+
run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }}
118120
macosx-arm64:
119121
runs-on: macos-14
120122
needs: prepare
@@ -138,7 +140,8 @@ jobs:
138140
mvn clean install -pl '!tensorflow-framework' -B -U -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }}
139141
- name: Deploy native artifact
140142
if: env.DEPLOY_RELEASE == 'true' || env.DEPLOY_SNAPSHOT == 'true'
141-
run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }}
143+
# run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }}
144+
run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }}
142145
deploy:
143146
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/staging') }} # DEPLOY_SNAPSHOT (releases should be signed and deployed manually from local machine)
144147
needs: [linux-x86_64, macosx-arm64, linux-arm64]

pom.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
</snapshotRepository>
8989
<repository>
9090
<id>central</id>
91-
<url>https://ossrh-staging-api.central.sonatype.com/service/local/staging/deployByRepositoryId/orgtensorflow-${stagingRepositoryId}/</url>
91+
<url>https://ossrh-staging-api.central.sonatype.com/service/local/staging/deployByRepositoryId/${stagingRepositoryId}/</url>
9292
</repository>
9393
</distributionManagement>
9494

@@ -160,7 +160,7 @@
160160
<id>central-staging</id>
161161
<name>Maven Central Staging</name>
162162
<url>
163-
https://ossrh-staging-api.central.sonatype.com/service/local/staging/deployByRepositoryId/orgtensorflow-${stagingRepositoryId}/
163+
https://ossrh-staging-api.central.sonatype.com/service/local/staging/deployByRepositoryId/${stagingRepositoryId}/
164164
</url>
165165
<releases>
166166
<enabled>true</enabled>
@@ -598,17 +598,16 @@
598598
</java>
599599
</configuration>
600600
</plugin>
601-
<!--FIXME: Enable this plugin again, and delete the distribution management section,
602-
once we find out how to deploy single native files in a staging repository by using it
603601
<plugin>
604602
<groupId>org.sonatype.central</groupId>
605603
<artifactId>central-publishing-maven-plugin</artifactId>
606-
<version>0.9.0</version>
604+
<version>0.10.0</version>
607605
<extensions>true</extensions>
608606
<configuration>
609607
<publishingServerId>central</publishingServerId>
608+
<ignorePublishedComponents>true</ignorePublishedComponents>
610609
</configuration>
611-
</plugin-->
610+
</plugin>
612611
</plugins>
613612

614613
<pluginManagement>

0 commit comments

Comments
 (0)