Skip to content

Commit

Permalink
ci: set GH_REPO and GH_TOKEN for release job (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangl-cc authored Nov 30, 2023
1 parent 1942d89 commit 6792bb1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ jobs:
permissions:
contents: write
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHANNEL: ${{ needs.meta.outputs.channel }}
VERSION: ${{ needs.meta.outputs.version }}
TAG: ${{ needs.meta.outputs.tag }}
Expand Down Expand Up @@ -251,11 +253,11 @@ jobs:
- name: Check existing release
if: ${{ fromJson(needs.meta.outputs.publish) }}
run: |
if [ "$TAG" == "nightly" ]; then
echo "Release as nightly, clear existing release and tag"
gh release delete "$TAG" --yes --cleanup-tag
else
if gh release view "$TAG" &> /dev/null; then
if gh release view "$TAG" &> /dev/null; then
if [ "$TAG" == "nightly" ]; then
echo "Release as nightly, clear existing release and tag"
gh release delete "$TAG" --yes --cleanup-tag
else
echo "Release $TAG already exists, abort"
exit 1
fi
Expand Down

0 comments on commit 6792bb1

Please sign in to comment.