Skip to content

Commit

Permalink
Refine conditions for npm-package workflow trigger
Browse files Browse the repository at this point in the history
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
  • Loading branch information
saumyaj3 committed Feb 12, 2025
1 parent ef54e8b commit 3df1094
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ jobs:

npm-package:
needs: [ conan-package ]
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
# Run the job for: 1) push to 'main' or branches starting with 'NP-', or 2) merged pull requests targeting 'main'.
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)}}
uses: ultimaker/cura-workflows/.github/workflows/npm-package.yml@main
with:
package_version_full: ${{ needs.conan-package.outputs.package_version_full }}
Expand Down

0 comments on commit 3df1094

Please sign in to comment.