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 12:13:16 UTC
[logging-log4j-tools] branch master updated: INFRA-23996 Try using `actions/setup-java` to import GPG secret key
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 f0da6f3 INFRA-23996 Try using `actions/setup-java` to import GPG secret key
f0da6f3 is described below
commit f0da6f335980316c190d448fc668c9e4f8dd270f
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Tue Jan 3 13:14:09 2023 +0100
INFRA-23996 Try using `actions/setup-java` to import GPG secret key
---
.github/workflows/build.yml | 16 ++++------------
.github/workflows/maven-settings.xml | 33 ---------------------------------
2 files changed, 4 insertions(+), 45 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index cfd812d..0c76b76 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -117,14 +117,10 @@ jobs:
java-package: jdk
architecture: x64
cache: maven
-
- - name: Import GPG secret key
- run: |
- echo -n "$GPG_SECRET_KEY" \
- | gpg -v --batch --import --yes --pinentry-mode error
- gpg --list-secret-keys
- env:
- $GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
+ server-id: ${{ github.ref == 'refs/heads/master' && 'apache.snapshots.https' || 'apache.releases.https' }}
+ server-username: ${{ secrets.NEXUS_USER }}
+ server-password: ${{ secrets.NEXUS_PW }}
+ gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
- name: Export artifact version
run: |
@@ -176,11 +172,7 @@ jobs:
-DskipTests=true \
-DinstallAtEnd=true \
-DdeployAtEnd=true \
- --settings .github/workflows/maven-settings.xml \
package gpg:sign install:install deploy:deploy
- env:
- NEXUS_USER: ${{ secrets.NEXUS_USER }}
- NEXUS_PW: ${{ secrets.NEXUS_PW }}
- name: Create artifacts (RELEASE)
if: startsWith(github.ref, 'refs/heads/release/')
diff --git a/.github/workflows/maven-settings.xml b/.github/workflows/maven-settings.xml
deleted file mode 100644
index 33a7f8f..0000000
--- a/.github/workflows/maven-settings.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?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_USER}</username>
- <password>${env.NEXUS_PW}</password>
- </server>
- <server>
- <id>apache.snapshots.https</id>
- <username>${env.NEXUS_USER}</username>
- <password>${env.NEXUS_PW}</password>
- </server>
- </servers>
-</settings>