Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Commit

Permalink
Update publish_package.yml to exclude drafts when retrieving the late…
Browse files Browse the repository at this point in the history
…st release or prerelease information
  • Loading branch information
kurmann committed Apr 25, 2024
1 parent 33c467d commit dfc1f82
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/publish_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ jobs:
- name: Get latest release or prerelease
id: get_release_or_prerelease
run: |
RELEASES_JSON=$(gh release list --json tagName,name,isPrerelease)
RELEASES_JSON=$(gh release list --json tagName,name,isPrerelease --exclude-drafts)
LATEST_RELEASE_OR_PRERELEASE_JSON=$(echo "$RELEASES_JSON" | jq -r '.[0]')
RELEASE_TAG_NAME=$(echo "$LATEST_RELEASE_OR_PRERELEASE_JSON" | jq -r '.tagName')
RELEASE_NAME=$(echo "$LATEST_RELEASE_OR_PRERELEASE_JSON" | jq -r '.name')
RELEASE_IS_PRERELEASE=$(echo "$LATEST_RELEASE_OR_PRERELEASE_JSON" | jq -r '.isPrerelease')
RELEASE_VERSION="${RELEASE_TAG_NAME#"v"}"
echo "Found latest release tag name: $RELEASE_TAG_NAME"
REPO_URL="https://github.com/${GITHUB_REPOSITORY}"
RELEASE_URL="${REPO_URL}/releases/tag/${RELEASE_TAG_NAME}"
Expand Down

0 comments on commit dfc1f82

Please sign in to comment.