Use offical gh cli instead of npm github-release-cli (#1264)

Signed-off-by: letmerecall <girishsharma001@gmail.com>
This commit is contained in:
Girish Sharma 2023-03-30 18:39:26 +05:30 committed by GitHub
parent 6eca34e727
commit 176fa0a663
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 10 deletions

View File

@ -169,20 +169,15 @@ jobs:
- name: publish binaries to github
if: startswith(github.ref, 'refs/tags/v')
run: |
echo "installing github-release-cli..."
sudo npm install --silent --no-progress -g github-release-cli@1.3.1
# Get the list of files
RELEASE_ARTIFACT=(${ARTIFACT_DIR}/*)
# Parse repository to get owner and repo names
OWNER_NAME="${GITHUB_REPOSITORY%%/*}"
REPO_NAME="${GITHUB_REPOSITORY#*/}"
export GITHUB_TOKEN=${{ secrets.DAPR_BOT_TOKEN }}
echo "Uploading Dapr CLI Binaries to GitHub Release"
github-release upload \
--owner $OWNER_NAME --repo $REPO_NAME \
--tag "v${REL_VERSION}" \
--name "Dapr CLI v${REL_VERSION}" \
--prerelease true \
gh release create \
"v${REL_VERSION}" \
--title "Dapr CLI v${REL_VERSION}" \
--repo $GITHUB_REPOSITORY \
--prerelease \
${RELEASE_ARTIFACT[*]}
publish-winget:
name: Publish to winget-pkgs