Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a github action to publish to NPM.js. #236

Merged
merged 3 commits into from
Mar 21, 2025

Conversation

plinio-square
Copy link
Collaborator

Add a github action to publish to NPM.js.
Fix package-lock.json was outdated.

Summary

Add a new action in .github to publish to NPM.JS. This still needs some configuration in our repo, but it's the first step.

Related issues

N/A

Changelog

Added npm-publish-github-packages.yml.
Modified package-lock.json.

Test Plan

Run the steps in the GH action in my computer with the --dry-run option

Fix package-lock.json was outdated.
@CLAassistant
Copy link

CLAassistant commented Mar 14, 2025

CLA assistant check
All committers have signed the CLA.

@@ -75,4 +75,4 @@ jobs:
run: ruby <(curl https://connect.squareup.com/readersdk-installer) install --app-id ${{secrets.SQUARE_READER_SDK_APPLICATION_ID}} --repo-password ${{secrets.SQUARE_READER_SDK_REPOSITORY_PASSWORD}} --version 1.6.1 > /dev/null
- name: Build iOS (debug)
working-directory: ./reader-sdk-react-native-quickstart/ios
run: xcodebuild -workspace RNReaderSDKSample.xcworkspace -configuration Debug -scheme RNReaderSDKSample -destination "platform=iOS Simulator,OS=16.2,name=iPhone 14"
run: xcodebuild -workspace RNReaderSDKSample.xcworkspace -configuration Debug -scheme RNReaderSDKSample -destination "platform=iOS Simulator,OS=18.2,name=iPhone 16"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How stable are those version numbers? Can they be pulled from some more visible config file or similar?

Or is that the "still needs some config" from your summary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they'd need to be changed every 2 years or so, basically if iOS has a new major version every year, they stop shipping xcode with the n-2 simulator (so for 2024 which saw iOS 18 getting released, the new xcode version dropped iOS 16). I think we can pass latest for the platform parameter, but for the name which is the sim device, we need to pass a explicit value. I'll check if there's an alternative

Copy link
Contributor

@fka3 fka3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That check sounds slow, I can +1 this. But I bet two years from now we're trying to figure out where the hell that number is....

@plinio-square
Copy link
Collaborator Author

yea we shouldn't need to worry anymore, I changed it to take generic/platform=iOS which will take the default iOS and device for this, so that should work without needing to update every 2 years

@plinio-square plinio-square merged commit 53e7a0e into master Mar 21, 2025
4 checks passed
@plinio-square plinio-square deleted the plinio/publish-with-github-actions branch March 21, 2025 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants