This is an automated email from the ASF dual-hosted git repository. arm pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tooling-actions.git
commit 5f26520eaced583af9fb458d2af01878f0762f08 Author: Alastair McFarlane <[email protected]> AuthorDate: Fri Jan 16 16:43:25 2026 +0000 Change expected repo layout - jar and pom --- .github/workflows/distribute-maven-stg.yml | 67 ++++++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 8 deletions(-) diff --git a/.github/workflows/distribute-maven-stg.yml b/.github/workflows/distribute-maven-stg.yml index 5f33f2a..ac3886c 100644 --- a/.github/workflows/distribute-maven-stg.yml +++ b/.github/workflows/distribute-maven-stg.yml @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -name: Distribute from ATR to Maven (stage - RAO) +name: Distribute from ATR to Maven Central run-name: "${{ inputs.atr-id }}" on: @@ -56,6 +56,7 @@ jobs: ATR_HOST: release-test.apache.org SSH_PORT: 2222 WORKFLOW: distribute-maven-stg.yml + NJORD_STORE: njord-deployer RAO_USERNAME: ${{ secrets.RAO_USERNAME }} RAO_PASSWORD: ${{ secrets.RAO_PASSWORD }} steps: @@ -77,13 +78,34 @@ jobs: <configuration> <njord.publisher>sonatype-nx3</njord.publisher> <njord.publisher.sonatype-nx3.baseUrl>https://repository.apache.org:4443/</njord.publisher.sonatype-nx3.baseUrl> - <njord.publisher.sonatype-nx3.releaseRepositoryName>maven-staging</njord.publisher.sonatype-nx3.releaseRepositoryName> </configuration> </server> </servers> </settings> EOF + - name: Create pom.xml + run: | + <?xml version="1.0" encoding="UTF-8"?> + <project xmlns="http://maven.apache.org/POM/4.0.0"> + <modelVersion>4.0.0</modelVersion> + <groupId>local</groupId> + <artifactId>$NJORD_STORE</artifactId> + <version>1.0</version> + <packaging>pom</packaging> + + <build> + <extensions> + <extension> + <groupId>eu.maveniverse.maven.njord</groupId> + <artifactId>extension3</artifactId> + <version>0.9.2</version> + </extension> + </extensions> + </build> + </project> + EOF + - name: Set up JDK 17 uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e with: @@ -185,9 +207,38 @@ jobs: SSH_PRIVATE_KEY_PATH: ${{ steps.generate-ssh-key.outputs.ssh_private_key_path }} - name: Build and stage locally - working-directory: ./stg run: | - mvn clean deploy -DaltDeploymentRepository=local::njord: + DIR="stg" + BASE="${INPUTS_DISTRIBUTION_PACKAGE}-${INPUTS_DISTRIBUTION_VERSION}" + + FILES="" CLASSIFIERS="" TYPES="" + for f in "$DIR/${BASE}"-*.*; do + # Skip checksums and signatures + [[ "$f" =~ \.(asc|sha1|sha256|sha512|md5)$ ]] && continue + # Skip main jar and pom + [[ "$f" == "$DIR/${BASE}.jar" ]] && continue + [[ "$f" == "$DIR/${BASE}.pom" ]] && continue + + # Extract classifier and type from filename + suffix="${f#$DIR/${BASE}-}" + classifier="${suffix%.*}" + type="${suffix##*.}" + + FILES="${FILES:+$FILES,}$f" + CLASSIFIERS="${CLASSIFIERS:+$CLASSIFIERS,}$classifier" + TYPES="${TYPES:+$TYPES,}$type" + done + + mvn deploy:deploy-file \ + -Dfile="$DIR/${BASE}.jar" \ + -DpomFile="$DIR/${BASE}.pom" \ + -Durl=njord: \ + -DrepositoryId=njord-local \ + ${FILES:+-Dfiles="$FILES" -Dclassifiers="$CLASSIFIERS" -Dtypes="$TYPES"} + env: + INPUTS_DISTRIBUTION_PACKAGE: ${{ inputs.distribution-package }} + INPUTS_DISTRIBUTION_VERSION: ${{ inputs.distribution-version }} + - name: Create staging tag run: | @@ -206,10 +257,10 @@ jobs: - name: Get store ID and publish working-directory: ./stg run: | - echo "Publishing store: $INPUTS_DISTRIBUTION_PACKAGE-00001" - mvn njord:validate -Dnjord.store=$INPUTS_DISTRIBUTION_PACKAGE-00001 -X - mvn njord:publish -Dnjord.store=$INPUTS_DISTRIBUTION_PACKAGE-00001 -Dnjord.target=rao3 -Dnjord.publisher.sonatype-nx3.releaseRepositoryName=maven-staging -X - mvn njord:drop -Dnjord.store=$INPUTS_DISTRIBUTION_PACKAGE-00001 -X + echo "Publishing store: $NJORD_STORE-00001" + mvn njord:validate -Dnjord.store=$NJORD_STORE-00001 + mvn njord:publish -Dnjord.store=$NJORD_STORE-00001 -Dnjord.target=rao3 -Dnjord.publisher.sonatype-nx3.releaseRepositoryName=maven-staging + mvn njord:drop -Dnjord.store=$NJORD_STORE-00001 env: INPUTS_DISTRIBUTION_PACKAGE: ${{ inputs.distribution-package }} --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
