feat: Add GitHub actions packager option#65
Open
appfr3d wants to merge 4 commits intocallstackincubator:mainfrom
Open
feat: Add GitHub actions packager option#65appfr3d wants to merge 4 commits intocallstackincubator:mainfrom
appfr3d wants to merge 4 commits intocallstackincubator:mainfrom
Conversation
|
@appfr3d is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
V3RON
reviewed
Feb 4, 2026
Contributor
V3RON
left a comment
There was a problem hiding this comment.
Wouldn't it be easier to just have a short shell script that checks the working directory, figures out which lockfile is present, and sets a variable based on that? Then we can use that variable in the next step to run Harness.
- name: Detect Package Manager
id: detect-pm
run: |
if [ -f "pnpm-lock.yaml" ]; then
echo "manager=pnpm" >> $GITHUB_OUTPUT
echo "runner=pnpm exec" >> $GITHUB_OUTPUT
elif [ -f "yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "runner=yarn" >> $GITHUB_OUTPUT
elif [ -f "bun.lockb" ]; then
echo "manager=bun" >> $GITHUB_OUTPUT
echo "runner=bun x" >> $GITHUB_OUTPUT
else
echo "manager=npm" >> $GITHUB_OUTPUT
echo "runner=npx" >> $GITHUB_OUTPUT
fi
- name: Run CLI Tool
run: ${{ steps.detect-pm.outputs.runner }} react-native-harness
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The PR adds the
packagerinput option to the GitHub Actions provided by this library, in favour of the hardcodedpnpmpackager.pnpmis still the default option for backward compatibility.Related Issue
N/A
Context
I really like the
react-native-harnesslibrary, and just started using it on a clients project. That project usesnpmand notpnpmwhich is currently hardcoded into the GitHub Actions. Since your "Getting started" guides suggest that this library supports multiple different packagers, I created this PR to make the GitHub Actions also support different packagers.The input option name
packagerwas influenced by how Expo names it in their GitHub Actions.Testing
Not sure how to test this change, but it passes
pnpm test:allandpnpm typecheck:all.Also tested on clients GitHub Actions by referencing the fork like this
uses: appfr3d/react-native-harness/actions/ios@github-actions-packager-optionand setting
packager: npm.