Skip to content

Commit

Permalink
ci: Manual notif of the latest release notes.
Browse files Browse the repository at this point in the history
  • Loading branch information
hughlv committed Aug 12, 2024
1 parent 15d2976 commit 0e29eba
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/discord-release-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ jobs:
steps:
- name: Set test variables
if: ${{ github.event_name == 'workflow_dispatch' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "RELEASE_TAG=v1.0.0-test" >> $GITHUB_ENV
echo "RELEASE_NAME=Test Release" >> $GITHUB_ENV
echo "RELEASE_BODY=This is a test release." >> $GITHUB_ENV
echo "RELEASE_URL=https://example.com" >> $GITHUB_ENV
latest_release=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
"https://api.github.com/repos/${{ github.repository }}/releases/latest")
echo "RELEASE_TAG=$(echo $latest_release | jq -r .tag_name)" >> $GITHUB_ENV
echo "RELEASE_NAME=$(echo $latest_release | jq -r .name)" >> $GITHUB_ENV
echo "RELEASE_BODY=$(echo $latest_release | jq -r .body)" >> $GITHUB_ENV
echo "RELEASE_URL=$(echo $latest_release | jq -r .html_url)" >> $GITHUB_ENV
- name: Dump GitHub context
env:
Expand Down

0 comments on commit 0e29eba

Please sign in to comment.