Skip to content

OpenPj is publishing the Release Candidate on ASF SVN🚀 #1

OpenPj is publishing the Release Candidate on ASF SVN🚀

OpenPj is publishing the Release Candidate on ASF SVN🚀 #1

# 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 Candidate in ASF SVN
run-name: ${{ github.actor }} is publishing the Release Candidate on ASF SVN🚀
on:
workflow_dispatch:
inputs:
APACHE_ID:
description: Your Apache id
required: true
APACHE_PASSWORD:
description: Your Apache password
required: true
jobs:
finalizeReleaseCandidateInSVN:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- name: Get Maven POM version
id: mavenProjectVersion
run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
- name: Create Standard Maven Version
id: standardMavenVersion
run: |
currentMavenVersion="${{ steps.mavenProjectVersion.outputs.version }}"
set -- currentMavenVersion
echo "version=${1%-*}" >> $GITHUB_OUTPUT
- name: Download artifacts from GitHub and Upload artifacts into ASF SVN
run: |
svn co https://dist.apache.org/repos/dist/dev/manifoldcf
mkdir -p apache-manifoldcf-${{ steps.mavenProjectVersion.outputs.version }}
cd apache-manifoldcf-${{ steps.mavenProjectVersion.outputs.version }}
if (svn ls "apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.zip"); then
echo "Removing existing apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.zip"
svn delete "apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.zip"
fi
if (svn ls "apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.tar.gz"); then
echo "Removing existing apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.tar.gz"
svn delete "apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.tar.gz"
fi
if (svn ls "apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.tar.gz"); then
echo "Removing existing apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.tar.gz"
svn delete "apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.tar.gz"
fi
if (svn ls "apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.zip"); then
echo "Removing existing apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.zip"
svn delete "apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.zip"
fi
if (svn ls "apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.tar.gz"); then
echo "Removing existing apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.tar.gz"
svn delete "apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.tar.gz"
fi
if (svn ls "apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.zip"); then
echo "Removing existing apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.zip"
svn delete "apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.zip"
fi
echo "Downloading: https://github.com/apache/manifoldcf/releases/download/${{ steps.mavenProjectVersion.outputs.version }}/apache-manifoldcf-${{steps.standardMavenVersion.outputs.version}}-dev-bin.zip"
wget https://github.com/apache/manifoldcf/releases/download/${{ steps.mavenProjectVersion.outputs.version }}/apache-manifoldcf-${{steps.standardMavenVersion.outputs.version}}-dev-bin.zip -O "apache-manifoldcf-${{steps.standardMavenVersion.outputs.version}}-dev-bin.zip"
echo "Downloading: https://github.com/apache/manifoldcf/releases/download/${{ steps.mavenProjectVersion.outputs.version }}/apache-manifoldcf-${{steps.standardMavenVersion.outputs.version}}-dev-bin.tar.gz"
wget https://github.com/apache/manifoldcf/releases/download/${{ steps.mavenProjectVersion.outputs.version }}/apache-manifoldcf-${{steps.standardMavenVersion.outputs.version}}-dev-bin.tar.gz -O "apache-manifoldcf-${{steps.standardMavenVersion.outputs.version}}-dev-bin.tar.gz"
echo "Downloading: https://github.com/apache/manifoldcf/releases/download/${{ steps.mavenProjectVersion.outputs.version }}/apache-manifoldcf-${{steps.standardMavenVersion.outputs.version}}-dev-lib.tar.gz"
wget https://github.com/apache/manifoldcf/releases/download/${{ steps.mavenProjectVersion.outputs.version }}/apache-manifoldcf-${{steps.standardMavenVersion.outputs.version}}-dev-lib.tar.gz -O "apache-manifoldcf-${{steps.standardMavenVersion.outputs.version}}-dev-lib.tar.gz"
echo "Downloading: https://github.com/apache/manifoldcf/releases/download/${{ steps.mavenProjectVersion.outputs.version }}/apache-manifoldcf-${{steps.standardMavenVersion.outputs.version}}-dev-lib.zip"
wget https://github.com/apache/manifoldcf/releases/download/${{ steps.mavenProjectVersion.outputs.version }}/apache-manifoldcf-${{steps.standardMavenVersion.outputs.version}}-dev-lib.zip -O "apache-manifoldcf-${{steps.standardMavenVersion.outputs.version}}-dev-lib.zip"
echo "Downloading: https://github.com/apache/manifoldcf/releases/download/${{ steps.mavenProjectVersion.outputs.version }}/apache-manifoldcf-${{steps.standardMavenVersion.outputs.version}}-dev-src.tar.gz"
wget https://github.com/apache/manifoldcf/releases/download/${{ steps.mavenProjectVersion.outputs.version }}/apache-manifoldcf-${{steps.standardMavenVersion.outputs.version}}-dev-src.tar.gz -O "apache-manifoldcf-${{steps.standardMavenVersion.outputs.version}}-dev-src.tar.gz"
echo "Downloading: https://github.com/apache/manifoldcf/releases/download/${{ steps.mavenProjectVersion.outputs.version }}/apache-manifoldcf-${{steps.standardMavenVersion.outputs.version}}-dev-src.zip"
wget https://github.com/apache/manifoldcf/releases/download/${{ steps.mavenProjectVersion.outputs.version }}/apache-manifoldcf-${{steps.standardMavenVersion.outputs.version}}-dev-src.zip -O "apache-manifoldcf-${{steps.standardMavenVersion.outputs.version}}-dev-src.zip"
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- 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: Generate file hashes
run: |
echo "$GPG_PRIVATE_KEY" | gpg --batch --import --passphrase "$GPG_PASSPHRASE"
gpg --local-user "${{steps.import_gpg.outputs.name}}" --armor --output apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.zip.asc --detach-sig apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.zip
gpg --local-user "${{steps.import_gpg.outputs.name}}" --armor --output apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.tar.gz.asc --detach-sig apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.tar.gz
gpg --local-user "${{steps.import_gpg.outputs.name}}" --armor --output apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.zip.asc --detach-sig apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.zip
gpg --local-user "${{steps.import_gpg.outputs.name}}" --armor --output apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.tar.gz.asc --detach-sig apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.tar.gz
gpg --local-user "${{steps.import_gpg.outputs.name}}" --armor --output apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.zip.asc --detach-sig apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.zip
gpg --local-user "${{steps.import_gpg.outputs.name}}" --armor --output apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.tar.gz.asc --detach-sig apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.tar.gz
gpg --print-md MD5 apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.zip > apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.zip.md5
gpg --print-md MD5 apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.tar.gz > apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.tar.gz.md5
gpg --print-md MD5 apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.zip > apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.zip.md5
gpg --print-md MD5 apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.tar.gz > apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.tar.gz.md5
gpg --print-md MD5 apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.zip > apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.zip.md5
gpg --print-md MD5 apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.tar.gz > apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.tar.gz.md5
gpg --print-md SHA512 apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.zip > apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.zip.sha512
gpg --print-md SHA512 apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.tar.gz > apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.tar.gz.sha512
gpg --print-md SHA512 apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.zip > apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.zip.sha512
gpg --print-md SHA512 apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.tar.gz > apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.tar.gz.sha512
gpg --print-md SHA512 apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.zip > apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.zip.sha512
gpg --print-md SHA512 apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.tar.gz > apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.tar.gz.sha512
svn add --force .
svn status
svn commit -m "Staging Apache ManifoldCF ${{ steps.artifactVersion.outputs.version }}" --non-interactive --username "${{ github.event.inputs.APACHE_ID }}" --password "${{ github.event.inputs.APACHE_PASSWORD }}"