This is an automated email from the ASF dual-hosted git repository.
slawrence pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/daffodil-infrastructure.git
The following commit(s) were added to refs/heads/main by this push:
new e856398 Do not include existing SVN artifacts in uploaded zip
e856398 is described below
commit e8563982080529c0b47b473e8b096c6ebbcd153f
Author: Steve Lawrence <[email protected]>
AuthorDate: Mon Sep 22 12:55:17 2025 -0400
Do not include existing SVN artifacts in uploaded zip
When the release-cadidate action does not publish a release (e.g.
snapshot build, triggered fromh workflow_dispatch), the action creates a
zip of the created artifacts so that they can be verified. However, it
can also include artifacts that already existed in SVN. This can lead to
confusion since there are unexpected files. This fixes the logic of how
we list artifacts to ensure we only include artifacts that were created
by the action so it excludes files that were already in SVN.
This also renames the "release" directory where artifacts are stored to
"release-download"--this makes its naming more clear that the zip
contains downloaded artifacts rather that locally built artifacts, and
makes the naming working better with the check-release container.
DAFFODIL-3040
---
actions/release-candidate/dist/main/index.js | 9 ++++++++-
actions/release-candidate/dist/post/index.js | 12 ++++++++----
actions/release-candidate/src/main.js | 9 ++++++++-
actions/release-candidate/src/post.js | 12 ++++++++----
4 files changed, 32 insertions(+), 10 deletions(-)
diff --git a/actions/release-candidate/dist/main/index.js
b/actions/release-candidate/dist/main/index.js
index c51d25a..c82ccf0 100644
--- a/actions/release-candidate/dist/main/index.js
+++ b/actions/release-candidate/dist/main/index.js
@@ -31931,7 +31931,14 @@ async function run() {
publish = false;
}
- const release_dir = `${ os.tmpdir() }/release`;
+ // the name of the directory where we store release artifacts
doesn't actually
+ // matter since it is never published anywhere. The one time
where this isn't true
+ // is if publishing is disabled, in which case this directory
is made available as
+ // a downloadable GitHub artifact. Naming it "release-download"
makes it more
+ // clear this is a downloaded artifact rather than locally
built--this
+ // differentiates it from artifacts created with the
build-release container and
+ // follows the naming convention expected by the check-release
script.
+ const release_dir = `${ os.tmpdir() }/release-download`;
fs.mkdirSync(release_dir);
// enable and configure SBT for signing and publishing. Note
that the
diff --git a/actions/release-candidate/dist/post/index.js
b/actions/release-candidate/dist/post/index.js
index 071f96c..3337e6d 100644
--- a/actions/release-candidate/dist/post/index.js
+++ b/actions/release-candidate/dist/post/index.js
@@ -125557,14 +125557,18 @@ async function run() {
} else {
// if publishing was disabled then this action was
likely just triggered
// just for testing, so upload the maven-local and
artifact directories so
- // they can be verified
- const release_dir = `${ os.tmpdir() }/release`;
- const upload_artifacts = fs.readdirSync(release_dir, {
recursive: true, withFileTypes: true })
+ // they can be verified. Note that we do not just
recurse the
+ // release-download directory since it could contain
files that already
+ // exist in the SVN checkout and were not artifacts
created by this action
+ const release_dir = `${ os.tmpdir() }/release-download`;
+ const svn_artifacts = fs.readdirSync(artifact_dir, {
recursive: true, withFileTypes: true });
+ const maven_artifacts = fs.readdirSync(`${ release_dir
}/maven-local`, { recursive: true, withFileTypes: true });
+ const upload_artifacts = [...svn_artifacts,
...maven_artifacts]
.filter((dirent) => dirent.isFile())
.filter((dirent) =>
!dirent.parentPath.split("/").includes(".svn"))
.map((dirent) => `${ dirent.parentPath }/${
dirent.name }`);
const artifact_client = new DefaultArtifactClient();
- artifact_client.uploadArtifact(`release`,
upload_artifacts, os.tmpdir(), {
+ artifact_client.uploadArtifact("release-download",
upload_artifacts, os.tmpdir(), {
compressionLevel: 0,
retentionDays: 1
});
diff --git a/actions/release-candidate/src/main.js
b/actions/release-candidate/src/main.js
index 81ad245..a7223ae 100644
--- a/actions/release-candidate/src/main.js
+++ b/actions/release-candidate/src/main.js
@@ -102,7 +102,14 @@ async function run() {
publish = false;
}
- const release_dir = `${ os.tmpdir() }/release`;
+ // the name of the directory where we store release artifacts
doesn't actually
+ // matter since it is never published anywhere. The one time
where this isn't true
+ // is if publishing is disabled, in which case this directory
is made available as
+ // a downloadable GitHub artifact. Naming it "release-download"
makes it more
+ // clear this is a downloaded artifact rather than locally
built--this
+ // differentiates it from artifacts created with the
build-release container and
+ // follows the naming convention expected by the check-release
script.
+ const release_dir = `${ os.tmpdir() }/release-download`;
fs.mkdirSync(release_dir);
// enable and configure SBT for signing and publishing. Note
that the
diff --git a/actions/release-candidate/src/post.js
b/actions/release-candidate/src/post.js
index 8a57939..9da3f9e 100644
--- a/actions/release-candidate/src/post.js
+++ b/actions/release-candidate/src/post.js
@@ -64,14 +64,18 @@ async function run() {
} else {
// if publishing was disabled then this action was
likely just triggered
// just for testing, so upload the maven-local and
artifact directories so
- // they can be verified
- const release_dir = `${ os.tmpdir() }/release`;
- const upload_artifacts = fs.readdirSync(release_dir, {
recursive: true, withFileTypes: true })
+ // they can be verified. Note that we do not just
recurse the
+ // release-download directory since it could contain
files that already
+ // exist in the SVN checkout and were not artifacts
created by this action
+ const release_dir = `${ os.tmpdir() }/release-download`;
+ const svn_artifacts = fs.readdirSync(artifact_dir, {
recursive: true, withFileTypes: true });
+ const maven_artifacts = fs.readdirSync(`${ release_dir
}/maven-local`, { recursive: true, withFileTypes: true });
+ const upload_artifacts = [...svn_artifacts,
...maven_artifacts]
.filter((dirent) => dirent.isFile())
.filter((dirent) =>
!dirent.parentPath.split("/").includes(".svn"))
.map((dirent) => `${ dirent.parentPath }/${
dirent.name }`);
const artifact_client = new DefaultArtifactClient();
- artifact_client.uploadArtifact(`release`,
upload_artifacts, os.tmpdir(), {
+ artifact_client.uploadArtifact("release-download",
upload_artifacts, os.tmpdir(), {
compressionLevel: 0,
retentionDays: 1
});