Skip to content

Commit

Permalink
small adjustments
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Koenig <[email protected]>
  • Loading branch information
ko3n1g committed Sep 23, 2024
1 parent fb19d5f commit dc97088
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,13 @@ jobs:
NAME="NVIDIA NeMo-Aligner ${VERSION}"
CHANGELOG=$(awk '/^## '"$NAME"'/{flag=1; next} /^## /{flag=0} flag' CHANGELOG.md)
CHANGELOG=$(echo "$CHANGELOG" | sed '/./,$!d' | sed ':a;N;$!ba;s/\n$//')
SHA=${{ github.sha }}
PAYLOAD=$(jq \
-n \
-c \
--arg TAG_NAME "v${VERSION}" \
--arg CI_COMMIT_BRANCH "${{ github.sha }}" \
--arg CI_COMMIT_BRANCH "$SHA" \
--arg NAME "$NAME" \
--arg BODY "$CHANGELOG" \
'{
Expand All @@ -129,11 +130,11 @@ jobs:
"generate_release_notes": false
}'
)
GH_TOKEN=${{ secrets.PAT }}
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.PAT }}" \
-H "Authorization: Bearer $GH_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/NVIDIA/NeMo-Aligner/releases \
-d "$PAYLOAD"
Expand All @@ -147,16 +148,17 @@ jobs:
run: |
VERSION=${{ needs.create-gh-release.outputs.version-number }}
URL="https://github.com/NVIDIA/NeMo-Aligner/releases/tag/v$VERSION"
WEBHOOK=${{ secrets.SLACK_WEBHOOK }}
MESSAGE='{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Releasebot 🤖: NeMo-Aligner released <'$URL'|`'$VERSION'`> 🚀"
"text": "Releasebot 🤖: NeMo-Aligner released <'$URL'|v'$VERSION'> 🚀"
}
}
]
}'
curl -X POST -H "Content-type: application/json" --data "$MESSAGE" ${{ secrets.SLACK_WEBHOOK }}
curl -X POST -H "Content-type: application/json" --data "$MESSAGE" $WEBHOOK

0 comments on commit dc97088

Please sign in to comment.