Skip to content

Commit

Permalink
chore: update to only download release assets for the current tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Dec 20, 2022
1 parent f3dbe73 commit 60e3431
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@ for tag in $(git tag -l --sort=-version:refname "$MAJOR_VERSION.*"); do
printf "\n---\n\n"
} >> "$INPUTS_RELEASE_NOTES_FILE"

# Download the release assets
gh release download "$tag" --dir "$RELEASE_ASSETS_DIR" || true
done

# Download the release asset
gh release download "$NEW_TAG" --dir "$RELEASE_ASSETS_DIR" || true

if [[ -f "$INPUTS_RELEASE_NOTES_FILE" ]]; then
if gh release view "$MAJOR_VERSION" > /dev/null 2>&1; then
# Update the release notes
gh release edit "$MAJOR_VERSION" --notes-file "$INPUTS_RELEASE_NOTES_FILE" --title "$MAJOR_VERSION"
if ls "$RELEASE_ASSETS_DIR"/*; then

# if the RELEASE_ASSETS_DIR is not empty, upload the assets
if [[ -n "$(find "$RELEASE_ASSETS_DIR" -type f)" ]]; then
gh release upload --clobber "$MAJOR_VERSION" "$RELEASE_ASSETS_DIR"/*
fi

Expand Down

0 comments on commit 60e3431

Please sign in to comment.