Skip to content

Commit

Permalink
Improve CI script
Browse files Browse the repository at this point in the history
  • Loading branch information
vy committed Jul 25, 2023
1 parent 6246995 commit 7ea0ac2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ jobs:
--show-version --batch-mode --errors --no-transfer-progress \
--non-recursive -P distribution
export DIST_FILENAME_PREFIX="apache-log4j-tools"
export DIST_FILENAME="${DIST_FILENAME_PREFIX}-${PROJECT_VERSION}.zip"
export DIST_FILEPATH="/tmp/${DIST_FILENAME}"
export DIST_FILENAME_VERSIONED_PREFIX="${DIST_FILENAME_PREFIX}-${PROJECT_VERSION}"
export DIST_FILEPATH="/tmp/${DIST_FILENAME_VERSIONED_PREFIX}.zip"
mv "target/dist.zip" "$DIST_FILEPATH"
gpg --armor --detach-sign --yes --pinentry-mode error "$DIST_FILEPATH"
sha512sum "$DIST_FILEPATH" > "$DIST_FILEPATH.sha512"
cat >> $GITHUB_ENV << EOF
DIST_FILENAME_PREFIX=$DIST_FILENAME_PREFIX
DIST_FILENAME=$DIST_FILENAME
DIST_FILENAME_VERSIONED_PREFIX=$DIST_FILENAME_VERSIONED_PREFIX
DIST_FILEPATH=$DIST_FILEPATH
EOF
Expand All @@ -206,17 +206,20 @@ jobs:
"$SVN_DIR"
cd "$SVN_DIR"
# Generate & add emails
"$GITHUB_WORKSPACE/.github/generate-email.sh" vote $PROJECT_VERSION $GITHUB_SHA > "$SVN_DIR/email-vote.txt"
"$GITHUB_WORKSPACE/.github/generate-email.sh" announce $PROJECT_VERSION $GITHUB_SHA > "$SVN_DIR/email-announce.txt"
svn add email-*.txt
# Clean up old files
find . -name "${DIST_FILENAME_PREFIX}*" -type f -print0 | xargs -0 -r svn delete
# Clean up old artifacts and add new ones
find . -name "${DIST_FILENAME_PREFIX}-*" -type f -print0 | xargs -0 -r svn delete
cp "${DIST_FILEPATH}"* .
svn add "${DIST_FILENAME}"*
# Generate emails
for EMAIL_TYPE in vote announce; do
"$GITHUB_WORKSPACE/.github/generate-email.sh" $EMAIL_TYPE $PROJECT_VERSION $GITHUB_SHA \
> "${DIST_FILENAME_VERSIONED_PREFIX}-email-${EMAIL_TYPE}.txt"
done
# Copy the distribution
cp "$DIST_FILEPATH"* .
# Commit changes
# Add & commit changes
svn add "${DIST_FILENAME_PREFIX}"*
svn commit \
--username "$SVN_USERNAME" \
--password "$SVN_PASSWORD" \
Expand Down
4 changes: 2 additions & 2 deletions RELEASING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ 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* (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
.. *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 (along with auxiliary files; email texts, etc.)
+
If not, commit necessary fixes, push, and repeat.
. _Close_ the repository in https://repository.apache.org/[repository.apache.org]
== Vote the release
. GitHub Actions workflow generates the vote email, send that email.
. Send the vote email uploaded to the https://dist.apache.org/repos/dist/dev/logging/log4j[dist.apache.org/repos/dist/**dev**/logging/log4j] Subversion repository
+
[WARNING]
====
Expand Down

0 comments on commit 7ea0ac2

Please sign in to comment.