This is an automated email from the ASF dual-hosted git repository.

vy pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/release-2.x by this push:
     new a710c55b26 INFRA-23225 Publish snapshots using GitHub Actions.
a710c55b26 is described below

commit a710c55b269ccbe131e0b86d55b93bd92a180fc4
Author: Volkan Yazıcı <[email protected]>
AuthorDate: Fri May 6 16:38:42 2022 +0200

    INFRA-23225 Publish snapshots using GitHub Actions.
---
 .github/workflows/build.yml          | 16 ++++++++++++++++
 .github/workflows/maven-settings.xml | 28 ++++++++++++++++++++++++++++
 pom.xml                              |  5 +++++
 3 files changed, 49 insertions(+)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 3281ddebbd..db9f33fa83 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -97,3 +97,19 @@ jobs:
             -DskipTests \
             --global-toolchains ".github/workflows/maven-toolchains.xml" \
             site
+
+      - name: Maven "deploy"
+        if: github.repository == 'apache/logging-log4j2' && github.ref == 
'refs/heads/release-2.x'
+        timeout-minutes: 15
+        shell: bash
+        run: |
+          ./mvnw \
+            --show-version --batch-mode --errors --no-transfer-progress \
+            -Dgpg.skip=true \
+            -DskipTests=true \
+            -DdeployAtEnd=true \
+            --settings .github/workflows/maven-settings.xml \
+            deploy:deploy
+        env:
+          NEXUS_USER: ${{ secrets.NEXUS_USER }}
+          NEXUS_PW: ${{ secrets.NEXUS_PW }}
diff --git a/.github/workflows/maven-settings.xml 
b/.github/workflows/maven-settings.xml
new file mode 100644
index 0000000000..5e8dbde337
--- /dev/null
+++ b/.github/workflows/maven-settings.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements. See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache license, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License. You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the license for the specific language governing permissions and
+  ~ limitations under the license.
+  -->
+<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0";
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 
http://maven.apache.org/xsd/settings-1.1.0.xsd";>
+  <servers>
+    <server>
+      <id>asf-snapshots</id>
+      <username>${env.NEXUS_USER}</username>
+      <password>${env.NEXUS_PW}</password>
+    </server>
+  </servers>
+</settings>
diff --git a/pom.xml b/pom.xml
index 6e8672740e..4fee616e20 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1650,6 +1650,11 @@
       <id>www.example.com</id>
       <url>scp://www.example.com/www/docs/project/</url>
     </site>
+    <snapshotRepository>
+      <id>asf-snapshots</id>
+      <name>ASF snapshot repository</name>
+      <url>https://repository.apache.org/content/repositories/snapshots</url>
+    </snapshotRepository>
   </distributionManagement>
   <modules>
     <module>log4j-api-java9</module>

Reply via email to