feat(ns-paystack): create release test

This commit is contained in:
Brian Pooe 2023-06-08 20:27:02 +02:00
commit 59cd77cd01
2 changed files with 30 additions and 8 deletions

View file

@ -33,13 +33,23 @@ jobs:
npx nx run-many --target release --all
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag=$(echo "${{ github.ref }}" | sed -e 's/refs\/tags\///')
echo "Creating release for tag $tag"
affected_projects=$(npx nx affected:apps --base=${{ github.event.before }} --head=${{ github.event.after }} --plain)
for project in $affected_projects; do
release_notes=$(sed -n "/## \[$tag\]/,/^##/p" $project/changelog.md)
gh release create "$tag-$project" --title "$tag-$project" --notes "$release_notes"
done
tag=$(echo "${{ github.ref }}" | sed -e 's/refs\/tags\///')
echo "Creating release for tag $tag"
affected_projects=$(npx nx affected:apps --base=${{ github.event.before }} --head=${{ github.event.after }} --plain)
for project in $affected_projects; do
changelog_file="$project/changelog.md"
if [ -f "$changelog_file" ]; then
release_notes=$(sed -n "/## \[$tag\]/,/^##/p" "$changelog_file")
if [ -z "$release_notes" ]; then
echo "No changelog entry found for tag $tag in $changelog_file"
else
gh release create "$tag-$project" --title "$tag-$project" --notes "$release_notes" --repo owner/repo
fi
else
echo "No changelog file found at $changelog_file"
fi
done

View file

@ -1,3 +1,15 @@
# [1.2.0](https://github.com/brianpooe/devtools-bp/compare/ns-paystack-v1.1.5...ns-paystack-v1.2.0) (2023-06-08)
### Bug Fixes
* **ns-paystack:** format ([9390cb4](https://github.com/brianpooe/devtools-bp/commit/9390cb4ea9e34d0f8dbcbcea1ac066858a72b2b7))
### Features
* **ns-paystack:** added create release ([0b6eb07](https://github.com/brianpooe/devtools-bp/commit/0b6eb0782d5431e1246ef2e28a276b2bb33ebe58))
## [1.1.5](https://github.com/brianpooe/devtools-bp/compare/ns-paystack-v1.1.4...ns-paystack-v1.1.5) (2023-06-08)