You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2022/10/22 05:16:33 UTC
[karaf-minho] branch main updated: Add credentials to deploy artifacts on Apache SNAPSHOTs repeository
This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/karaf-minho.git
The following commit(s) were added to refs/heads/main by this push:
new f109199 Add credentials to deploy artifacts on Apache SNAPSHOTs repeository
f109199 is described below
commit f109199650d99eba1de58c215c4c47ca43234244
Author: Jean-Baptiste Onofré <jb...@apache.org>
AuthorDate: Sat Oct 22 07:16:12 2022 +0200
Add credentials to deploy artifacts on Apache SNAPSHOTs repeository
---
.github/asf-deploy-settings.xml | 30 ++++++++++++++++++++++++++++++
.github/workflows/deploy.yml | 11 +++++++++--
2 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/.github/asf-deploy-settings.xml b/.github/asf-deploy-settings.xml
new file mode 100644
index 0000000..c5fdce4
--- /dev/null
+++ b/.github/asf-deploy-settings.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://maven.apache.org/SETTINGS/1.0.0
+ http://maven.apache.org/xsd/settings-1.0.0.xsd">
+
+ <servers>
+ <server>
+ <id>apache.snapshots.https</id>
+ <username>${env.NEXUS_DEPLOY_USERNAME}</username>
+ <password>${env.NEXUS_DEPLOY_PASSWORD}</password>
+ </server>
+ </servers>
+
+</settings>
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 37e32cd..9622388 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -21,18 +21,25 @@ name: Deploy
on:
schedule:
- cron: '30 2 * * *'
+ workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
+ if: github.ref == 'refs/heads/main'
+ env:
+ NEXUS_DEPLOY_USERNAME: ${{ secrets.NEXUS_USER }}
+ NEXUS_DEPLOY_PASSWORD: ${{ secrets.NEXUS_PW }}
steps:
- name: Checkout
uses: actions/checkout@v3
- - name: Set Up JDK 11
+ with:
+ persist-credentials: false
+ - name: Setup JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
cache: maven
- name: Deploy
- run: mvn --batch-mode --update-snapshots --no-transfer-progress deploy -Papache-release
+ run: mvn -U -B -e -fae -Papache-release clean deploy --settings .github/asf-deploy-settings.xml