You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by vy...@apache.org on 2023/01/03 23:13:25 UTC

[logging-log4j-tools] branch master updated: Random attempts

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

vy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j-tools.git


The following commit(s) were added to refs/heads/master by this push:
     new 2bde695  Random attempts
2bde695 is described below

commit 2bde69541f687582b796078d9d8cd05c87f265bf
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Wed Jan 4 00:14:20 2023 +0100

    Random attempts
---
 .github/workflows/build.yml          |  4 ++++
 .github/workflows/maven-settings.xml | 33 +++++++++++++++++++++++++++++++++
 pom.xml                              |  2 +-
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 08079fc..93e8c9f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -120,6 +120,8 @@ jobs:
           server-id: ${{ github.ref == 'refs/heads/master' && 'apache.snapshots.https' || 'apache.releases.https' }}
           server-username: NEXUS_USERNAME
           server-password: NEXUS_PASSWORD
+          # We won't use `maven-gpg-plugin`, but this is convenient to import the GPG secret key
+          gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
 
       - name: Export artifact version
         run: |
@@ -164,8 +166,10 @@ jobs:
       - name: Deploy
         run: |
           gpg --list-secret-keys
+          cat ~/.m2/settings.xml
           ./mvnw \
             --show-version --batch-mode --errors --no-transfer-progress \
+            --settings .github/workflows/maven-settings.xml \
             -P release -X
         env:
           NEXUS_USERNAME: ${{ secrets.NEXUS_USER }}
diff --git a/.github/workflows/maven-settings.xml b/.github/workflows/maven-settings.xml
new file mode 100644
index 0000000..9d823fc
--- /dev/null
+++ b/.github/workflows/maven-settings.xml
@@ -0,0 +1,33 @@
+<?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
+
+      https://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>apache.releases.https</id>
+      <username>${env.NEXUS_USERNAME}</username>
+      <password>${env.NEXUS_PASSWORD}</password>
+    </server>
+    <server>
+      <id>apache.snapshots.https</id>
+      <username>${env.NEXUS_USERNAME}</username>
+      <password>${env.NEXUS_PASSWORD}</password>
+    </server>
+  </servers>
+</settings>
diff --git a/pom.xml b/pom.xml
index a0bec00..3840649 100644
--- a/pom.xml
+++ b/pom.xml
@@ -153,7 +153,7 @@
 
       <build>
 
-        <defaultGoal>deploy</defaultGoal>
+        <defaultGoal>package sign:sign install:install deploy:deploy</defaultGoal>
 
         <plugins>