Skip to content

Commit

Permalink
chore: debug releases (#927)
Browse files Browse the repository at this point in the history
  • Loading branch information
stalniy authored Jun 16, 2024
1 parent ad615ab commit b437c28
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Check out code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
ref: ${{ github.event.pull_request.merged == true && github.ref_name || github.head_ref }}
- uses: pnpm/action-setup@v2
with:
version: 8.4.0
Expand Down Expand Up @@ -61,17 +61,22 @@ jobs:
echo "$release_notes"
if [ "${{github.event.pull_request.number}}" != "" ]; then
released_packages=$(extract_package_versions "$changed_paths");
if [ "$PREVIEW_BRANCH" = "" ]; then
released_packages=$(extract_package_versions "$changed_paths");
if [ "$released_packages" != "" ]; then
gh pr comment "${{ github.event.pull_request.number }}" --body "🚀 This PR changes was released in ${released_packages}"
else
gh pr comment "${{ github.event.pull_request.number }}" --body "No packages to release"
echo "No packages to release" >> $GITHUB_STEP_SUMMARY
fi
else
echo -e "# Release notes for packages that will be published after merge\n\n" > release_notes.txt
echo "$release_notes" | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' | sed '/^##/,$!d' >> release_notes.txt
gh pr comment "${{ github.event.pull_request.number }}" --body-file ./release_notes.txt
rm -f release_notes.txt
if [ "$released_packages" != "" ]; then
echo -e "# Release notes for packages that will be published after merge\n\n" > release_notes.txt
echo "$release_notes" | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' | sed '/^##/,$!d' >> release_notes.txt
gh pr comment "${{ github.event.pull_request.number }}" --body-file ./release_notes.txt
rm -f release_notes.txt
else
echo "No packages to release" >> $GITHUB_STEP_SUMMARY
fi
fi
fi
1 change: 1 addition & 0 deletions packages/casl-mongoose/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ export { accessibleBy } from './accessibleBy';
export type { AccessibleRecords } from './accessibleBy';

export { accessibleFieldsBy } from './accessibleFieldsBy';
// test changes
1 change: 1 addition & 0 deletions packages/dx/bin/release-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ ______HERE__;

extract_package_versions() {
changed_paths=$1;
changed_packages="$(echo "$changed_paths" | grep 'packages/' | grep -v packages/dx)";

released_packages=();
for path in $changed_packages; do
Expand Down

0 comments on commit b437c28

Please sign in to comment.