Skip to content

Commit 054dca7

Browse files
committed
Add a github action to publish to NPM.js.
Fix package-lock.json was outdated.
1 parent 9240c64 commit 054dca7

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed
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)