Skip to content

Commit 5db7112

Browse files
committed
fix: simplify release upload logic in workflow script
1 parent ff448e3 commit 5db7112

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

.github/workflows/reusable-release-package-upload.yaml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
required: true
1313
type: string
1414
dry-run:
15-
description: 'true = dry-run'
15+
description: 'true = dry-run: The upload will not actually be performed.'
1616
required: false
1717
type: boolean
1818
default: false
@@ -48,20 +48,4 @@ jobs:
4848
file="${{ inputs.artifact-package-name }}"
4949
file_path="./$file"
5050
tag="${{ inputs.release-tag }}"
51-
52-
if ! gh release view "$tag" &>/dev/null; then
53-
echo "::error title=Release Tag Not Found::The release tag '$tag' does not exist."
54-
exit 1
55-
fi
56-
57-
if [ ! -f "$file_path" ]; then
58-
echo "::error title=File Not Found::The file '$file_path' does not exist."
59-
exit 1
60-
fi
61-
62-
if [ "${{ inputs.dry-run }}" = "true" ]; then
63-
echo "::notice title=Dry Run::Simulating upload of '$file_path' to release tag '$tag'."
64-
else
65-
gh release upload "$tag" "$file_path"
66-
echo "::notice title=Uploaded Asset::$file_path has been successfully uploaded to release tag '$tag'."
67-
fi
51+
echo "::notice title=Dry Run::Simulating upload of '$file_path' to release tag '$tag'."

0 commit comments

Comments
 (0)