Skip to content

Merge pull request #260 from gin0606/fix/issue-259 #3

Merge pull request #260 from gin0606/fix/issue-259

Merge pull request #260 from gin0606/fix/issue-259 #3

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: react-native-square-in-app-payments
on:
push:
tags:
# matches 'v{{version}}', e.g. v1.4.3
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
# Use Yarn instead of npm
- name: Enable corepack (Yarn)
run: corepack enable
- name: Install dependencies
run: yarn install --immutable
- name: Build package tarball with Yarn
run: yarn pack --out package.tgz
# Still use npm to publish the already-generated tarball
- name: Publish to npm
run: npm publish package.tgz --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}