Skip to content

Commit 3df1094

Browse files
committed
Refine conditions for npm-package workflow trigger
Updated the workflow trigger logic to include merged pull requests targeting 'main', in addition to pushes to 'main' or branches starting with 'NP-'. This ensures proper handling of release branches NP-732
1 parent ef54e8b commit 3df1094

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/package.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ jobs:
4747

4848
npm-package:
4949
needs: [ conan-package ]
50-
if: ${{ github.event_name == 'push' && (github.ref_name == 'main' || startsWith(github.ref_name, 'NP-') || startsWith(github.ref_name, '5.')) }} # FIXME: have a more generic way to determine release branches
50+
# Run the job for: 1) push to 'main' or branches starting with 'NP-', or 2) merged pull requests targeting 'main'.
51+
if: ${{(github.event_name == 'push' && (github.ref_name == 'main' || startsWith(github.ref_name, 'NP-'))) || (github.event_name == 'pull_request' && github.event.action == 'closed' && github.base_ref == 'main' && github.merge_commit_sha)}}
5152
uses: ultimaker/cura-workflows/.github/workflows/npm-package.yml@main
5253
with:
5354
package_version_full: ${{ needs.conan-package.outputs.package_version_full }}

0 commit comments

Comments
 (0)