Skip to content

Commit

Permalink
chore(CI): update release flow
Browse files Browse the repository at this point in the history
  • Loading branch information
btnguyen2k committed Feb 13, 2024
1 parent 811bbd4 commit c7cd7de
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ jobs:
RELEASE_NOTES: ${{ needs.ReleaseDryRun.outputs.RELEASE_NOTES }}
steps:
- uses: actions/checkout@v4
- name: Update module meta
- name: Update module metadata
run: |
RESULT='${{ needs.ReleaseDryRun.outputs.RESULT }}'
VERSION='${{ needs.ReleaseDryRun.outputs.VERSION }}'
RELEASE_NOTES='${{ needs.ReleaseDryRun.outputs.RELEASE_NOTES }}'
echo "🕘 Updating module meta..."
echo "🕘 Updating module metadata..."
echo " - RESULT: ${RESULT}"
echo " - VERSION: ${VERSION}"
echo " - RELEASE_NOTES: ${RELEASE_NOTES}"
Expand All @@ -82,8 +82,9 @@ jobs:
echo ========== content of ${FILE_MODULE} ==========
cat ${FILE_MODULE}
echo ========== update .go files ==========
echo ========== update .go/.md files ==========
sed -i -E "s/<<VERSION>>/v${VERSION}/" ./*.go
sed -i -E "s/<<VERSION>>/v${VERSION}/" ./*.md
echo ========== commit updates ==========
git config --global user.email "<>"
Expand Down Expand Up @@ -120,6 +121,21 @@ jobs:
prerelease: false,
});
console.log('✅ Created release: ', release);
- name: Cleanup file .semrelease/this_release
run: |
RESULT='${{ needs.ReleaseDryRun.outputs.RESULT }}'
if [ "${RESULT}" == "SUCCESS" ]; then
VERSION='${{ needs.ReleaseDryRun.outputs.VERSION }}'
echo "🕘 Cleaning up file .semrelease/this_release..."
echo > .semrelease/this_release
git config --global user.email "<>"
git config --global user.name "CI Build"
git commit -am "Cleanup file .semrelease/this_release post releasing version ${VERSION}"
git push -f
echo "✅ Done."
else
echo "❎ SKIPPED."
fi
MergeToMain:
runs-on: ubuntu-latest
Expand Down

0 comments on commit c7cd7de

Please sign in to comment.