Skip to content

OpenPj is publishing release artifacts #5

OpenPj is publishing release artifacts

OpenPj is publishing release artifacts #5

#
# 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.
#
name: Publish Release Artifacts
run-name: ${{ github.actor }} is publishing release artifacts
on:
workflow_dispatch:
inputs:
release:
type: choice
description: Select the ManifoldCF release
options:
- release-2.26 #Java 11
- release-2.25
- release-2.24
- release-2.23
- release-2.22
- release-2.21
- release-2.20
- release-2.19
- release-2.18
- release-2.17
- release-2.16
- release-2.15
- release-2.14
- release-2.13
- release-2.12
- release-2.11
- release-2.10
- release-2.9
- release-2.8
- release-2.7 #Java 1.8
- release-2.6
- release-2.5
- release-2.4
- release-2.3
- release-2.2
- release-2.1
- release-2.0 #Java 1.7
- release-1.9
- release-1.8
- release-1.2 #Java 1.6
- release-1.1
- release-1.0 #Java 1.5
jobs:
deployReleaseMavenArtifacts:
if: github.repository == 'apache/manifoldcf'
name: "Deploy Apache ManifoldCF release artifacts"
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/[email protected]
with:
ref: ${{ github.event.inputs.release }}
- name: Set up Java
uses: actions/[email protected]
with:
java-version: '11'
distribution: 'temurin'
architecture: x64
cache: maven
server-id: apache.releases.https
server-username: NEXUS_USER
server-password: NEXUS_PW
settings-path: ${{ github.workspace }}/.github/asf-deploy-settings.xml
- name: Ant Build
env:
RELEASE: ${{ inputs.release }}
run: |
if [[ $RELEASE == 'release-2.26' ]]; then
sed -i -e 's/<?xml version=\"1\.0\" encoding=\"UTF-8\"?>/ /g' connectors/csv/pom.xml
sed -i -e 's/https\:\/\/maven.nuxeo.org\/nexus\/content\/repositories\/public-releases/https\:\/\/packages.nuxeo.com\/repository\/maven-public-archives/g' build.xml
sed -i -e 's/https\:\/\/maven.nuxeo.org\/nexus\/content\/repositories\/public-releases\//https\:\/\/packages.nuxeo.com\/repository\/maven-public-archives/g' connectors/nuxeo/pom.xml
sed -i -e 's/<\/dependencies>/<dependency><groupId>org.apache.hadoop<\/groupId><artifactId>hadoop-annotations<\/artifactId><version>\${hadoop.version}<\/version><exclusions><exclusion><groupId>jdk.tools<\/groupId><artifactId>jdk.tools<\/artifactId><\/exclusion><\/exclusions><\/dependency><\/dependencies>/g' connectors/hdfs/pom.xml
fi
ant make-core-deps make-deps image
- name: Maven Build
run: mvn clean install -B -DskipTests -DskipITs -Papache-release
- name: Mask Apache Password
run: |
# Workaround for Actions bug - https://github.com/actions/runner/issues/643
APACHE_PASS=$(jq -r '.inputs.APACHE_PASSWORD' $GITHUB_EVENT_PATH)
echo "::add-mask::$APACHE_PASS"
- name: Deploy
env:
NEXUS_USER: ${{ secrets.NEXUS_STAGE_DEPLOYER_USER }}
NEXUS_PW: ${{ secrets.NEXUS_STAGE_DEPLOYER_PW }}
MAVEN_SETTINGS: ${{ github.workspace }}/.github/asf-deploy-settings.xml
MAVEN_USERNAME: ${{ secrets.NEXUS_STAGE_DEPLOYER_USER }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.NEXUS_STAGE_DEPLOYER_PW }}
MAVEN_GPG_PASSPHRASE: ""
#run: mvn deploy -B -e -q -DskipTests -DskipITs -DrepositoryId=apache.releases.https -Papache-release
run: |
mvn -B -e -q org.sonatype.plugins:nexus-staging-maven-plugin:deploy \
-DskipTests \
-DskipITs \
-Dcargo-build.profile=release \
-Dcargo-build.features=services-all \
-Dcargo-build.enableZigbuild=true \
-DskipRemoteStaging=true \
-DserverId=apache.releases.https \
-DnexusUrl=https://repository.apache.org
- name: Deploy local staged artifacts
if: ${{ github.event_name != 'pull_request' }}
run: |
./mvn org.sonatype.plugins:nexus-staging-maven-plugin:deploy-staged \
-DskipStagingRepositoryClose=true \
-DserverId=apache.releases.https \
-DnexusUrl=https://repository.apache.org
env:
NEXUS_USER: ${{ secrets.NEXUS_STAGE_DEPLOYER_USER }}
NEXUS_PW: ${{ secrets.NEXUS_STAGE_DEPLOYER_PW }}
MAVEN_SETTINGS: ${{ github.workspace }}/.github/asf-deploy-settings.xml
MAVEN_USERNAME: ${{ secrets.NEXUS_STAGE_DEPLOYER_USER }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.NEXUS_STAGE_DEPLOYER_PW }}
MAVEN_GPG_PASSPHRASE: ""