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

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

commit 81d49b830a143c1ca52bac3da6908d8c376df46b
Author: Volkan Yazıcı <[email protected]>
AuthorDate: Mon Jul 24 23:10:26 2023 +0200

    INFRA-24803 Upload to Subversion in CI
---
 .github/workflows/build.yml | 31 ++++++++++++++++++++++++++-----
 RELEASING.adoc              |  5 +++--
 2 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 5121185..9ae8134 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -134,7 +134,7 @@ jobs:
           # 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
+      - name: Export version
         run: |
           export PROJECT_VERSION=$(./mvnw \
             --quiet --batch-mode -DforceStdout=true \
@@ -163,7 +163,7 @@ jobs:
             exit 1
           }
 
-      - name: Deploy
+      - name: Upload to Nexus
         run: |
           gpg --list-secret-keys
           ./mvnw \
@@ -176,18 +176,39 @@ jobs:
           # `SIGN_KEY` is used by `sign-maven-plugin`
           SIGN_KEY: ${{ secrets.GPG_SECRET_KEY }}
 
-      - name: Create artifacts (RELEASE)
+      - name: Create distribution artifacts (RELEASE)
         if: startsWith(github.ref, 'refs/heads/release/')
         run: |
           ./mvnw \
             --show-version --batch-mode --errors --no-transfer-progress \
             --non-recursive -P distribution
-          export DIST_FILEPATH="/tmp/apache-log4j-tools-${PROJECT_VERSION}.zip"
+          export DIST_BASENAME="apache-log4j-tools"
+          export DIST_FILEPATH="/tmp/${DIST_BASENAME}-${PROJECT_VERSION}.zip"
           mv "target/dist.zip" "$DIST_FILEPATH"
           gpg --armor --detach-sign --yes --pinentry-mode error 
"$DIST_FILEPATH"
           sha512sum "$DIST_FILEPATH" > "$DIST_FILEPATH.sha512"
+          echo "DIST_BASENAME=$DIST_BASENAME" >> $GITHUB_ENV
           echo "DIST_FILEPATH=$DIST_FILEPATH" >> $GITHUB_ENV
 
+      - name: Upload to Subversion (RELEASE)
+        if: startsWith(github.ref, 'refs/heads/release/')
+        run: |
+          SVN_DIR="/tmp/svn-repo"
+          svn co \
+            --depth files \
+            --username "$SVN_USERNAME" \
+            --password "$SVN_PASSWORD" \
+            https://dist.apache.org/repos/dist/dev/logging/log4j \
+            "$SVN_DIR"
+          cd "$SVN_DIR"
+          find . -name "${DIST_BASENAME}-*" -type f -print0 | xargs -0 svn 
delete
+          cp "${DIST_FILEPATH}*" .
+          svn add "${DIST_FILEPATH}*"
+          svn commit -m "Added \`${DIST_BASENAME}\` artifacts for release 
\`${PROJECT_VERSION}\`"
+        env:
+          SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
+          SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
+
       - name: Generate vote email (RELEASE)
         if: startsWith(github.ref, 'refs/heads/release/')
         run: |
@@ -200,7 +221,7 @@ jobs:
           ./.github/generate-email.sh announce $PROJECT_VERSION $GITHUB_SHA \
             > /tmp/email-announce.txt
 
-      - name: Upload the distribution (RELEASE)
+      - name: Upload to GitHub (RELEASE)
         if: startsWith(github.ref, 'refs/heads/release/')
         uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce 
  # 3.1.2
         with:
diff --git a/RELEASING.adoc b/RELEASING.adoc
index 7cbd564..11b61ac 100644
--- a/RELEASING.adoc
+++ b/RELEASING.adoc
@@ -34,12 +34,13 @@ In the code examples below, assuming the version to be 
released is `7.8.0`.
 . Commit and push the `release/7.8.0` branch
 . Make sure the associated 
https://github.com/apache/logging-log4j-tools/actions[GitHub Actions workflow] 
succeeds:
 .. *Signed artifacts* are uploaded to the _Staging Repositories_ in 
https://repository.apache.org/[repository.apache.org]
-.. *Signed distribution and its checksum* are uploaded as GitHub Actions 
workflow artifacts
+.. *Signed distribution and its checksum* (e.g., 
`apache-log4j-tools-7.8.0.{zip,.zip.asc,.zip.sha512}`) are uploaded to
+... 
https://dist.apache.org/repos/dist/dev/logging/log4j[dist.apache.org/repos/dist/**dev**/logging/log4j]
 Subversion repository
+... GitHub as workflow artifacts
 
 +
 If not, commit necessary fixes, push, and repeat.
 . _Close_ the repository in 
https://repository.apache.org/[repository.apache.org]
-. Commit _the signed distribution and its checksum_ (e.g., 
`apache-log4j-tools-7.8.0.{zip,.zip.asc,.zip.sha512}`) to 
https://dist.apache.org/repos/dist/dev/logging/log4j[dist.apache.org/repos/dist/**dev**/logging/log4j]
 Subversion repository and delete any artifacts from old releases
 
 == Vote the release
 

Reply via email to