Skip to content

Commit 53e7a0e

Browse files
Add a github action to publish to NPM.js. (#236)
* Add a github action to publish to NPM.js. Fix package-lock.json was outdated. * Fix build-ios task by changing the simulator device to iPhone 16 iOS 18.2 * Making destination generic on build iOS step
1 parent 9240c64 commit 53e7a0e

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ jobs:
7575
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
7676
- name: Build iOS (debug)
7777
working-directory: ./reader-sdk-react-native-quickstart/ios
78-
run: xcodebuild -workspace RNReaderSDKSample.xcworkspace -configuration Debug -scheme RNReaderSDKSample -destination "platform=iOS Simulator,OS=16.2,name=iPhone 14"
78+
run: xcodebuild -workspace RNReaderSDKSample.xcworkspace -configuration Debug -scheme RNReaderSDKSample -destination generic/platform=iOS
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+
name: react-native-square-reader-sdk
5+
6+
on:
7+
push:
8+
tags:
9+
# matches 'v{{version}}', e.g. v1.4.3
10+
- 'v[0-9]+.[0-9]+.[0-9]+'
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
id-token: write
18+
steps:
19+
- uses: actions/checkout@v4
20+
# Setup .npmrc file to publish to npm
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: '20.x'
24+
registry-url: 'https://registry.npmjs.org'
25+
- run: npm i
26+
- run: npm pack
27+
- run: npm publish --provenance --access public
28+
env:
29+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)