Skip to content

Commit

Permalink
fix: removes redundant comment
Browse files Browse the repository at this point in the history
  • Loading branch information
stalniy committed Jun 16, 2024
1 parent b437c28 commit 9abc0d6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Release packages
on:
pull_request:
types: [closed, labeled]
# types: [closed, labeled]
# workflow_dispatch:
# inputs:
# packagePath:
Expand Down Expand Up @@ -46,8 +46,7 @@ jobs:
GH_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.RELEASE_NPM_TOKEN }}
ACTIONS_STEP_DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG }}
PREVIEW_BRANCH: ${{ github.event.pull_request.merged != true && github.head_ref }}
GITHUB_REF: ${{ github.head_ref }}
PREVIEW_RELEASE: ${{ github.event.pull_request.merged == true && 'no' || 'yes' }}
# GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
if [[ "${TRACE:-false}" == true || "${ACTIONS_STEP_DEBUG:-false}" == true ]]; then
Expand All @@ -56,14 +55,19 @@ jobs:
unset GITHUB_ACTIONS
. ./packages/dx/bin/release-packages.sh
preview_branch=""
if [ "$PREVIEW_RELEASE" = "yes" ]; then
preview_branch="${{ github.head_ref }}"
fi
changed_paths="$(gh pr view --json files --jq '.files.[].path' "${{ github.event.pull_request.number }}" | cut -d / -f 1,2 | uniq)";
release_notes=$(release_packages "$changed_paths" "$PREVIEW_BRANCH")
release_notes=$(release_packages "$changed_paths" "$preview_branch")
echo "$release_notes"
if [ "${{github.event.pull_request.number}}" != "" ]; then
released_packages=$(extract_package_versions "$changed_paths");
if [ "$PREVIEW_BRANCH" = "" ]; then
if [ "$preview_branch" = "" ]; then
if [ "$released_packages" != "" ]; then
gh pr comment "${{ github.event.pull_request.number }}" --body "🚀 This PR changes was released in ${released_packages}"
else
Expand Down
1 change: 0 additions & 1 deletion packages/casl-mongoose/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ export { accessibleBy } from './accessibleBy';
export type { AccessibleRecords } from './accessibleBy';

export { accessibleFieldsBy } from './accessibleFieldsBy';
// test changes
2 changes: 1 addition & 1 deletion packages/dx/bin/release-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ______HERE__;
release_options=" --dry-run --no-ci --branches master,$preview_branch"
fi
echo "running: pnpm run -r $pnpm_options release $release_options" >> $GITHUB_STEP_SUMMARY
pnpm run -r $pnpm_options release $release_options
pnpm run -r $pnpm_options release --dry-run $release_options
}

extract_package_versions() {
Expand Down

0 comments on commit 9abc0d6

Please sign in to comment.